12 Reporting and logging with Python

 

This chapter covers

  • Creating automated reports
  • Sending emails with Python
  • Using the logging module to monitor running code

So far we’ve covered many of the key elements of building and deploying a machine learning pipeline into production, including better structuring your code, scaling, testing, and scheduling. Another piece of the pipeline that is very important is monitoring. Monitoring can be considered in several contexts:

  • Automated reports
  • Sending notifications, including email alerts, when certain events occur, such as pipeline completion or model failure
  • Logging events related to code execution to help with debugging issues

12.1 Creating automated reports

12.1.1 Introducing Reportlab

12.1.2 Automating a model metrics report

12.2 Sending emails with Python

12.3 Monitoring with the logging module

12.4 Practice on your own

12.5 Summary