Logging
Explore the role of logging in machine learning pipelines and learn how to use Python's logging module to track execution events, set logging levels, and manage output destinations. This lesson helps you improve debugging and monitoring by organizing log messages for better pipeline maintenance.
We'll cover the following...
An introduction to logging
Logging is the means by which we keep track of events that occur during the execution of a program. Whether we realize it or not, we’ve all done logging in our programs in one way or another. We all know about the Python print statement. Every Python programmer starts off debugging by writing print statements throughout their code to print informational and error messages and display variable values. Let’s take a look at an example.
In this code, we have a function that computes the sum of all elements in a list. There are a couple of informational messages, Computing sum... and ...