How to Use Logging in Python
Intro
Recently I was fine-tuning my deep learning model, and I habitually started to use print
to print some key information on the terminal. So my workflow is like:
- I type some hyperparameters to train my model.
- I manually opened an Excel to record the hyperparameters used and the model evaluation results. And I will go back to step 1. If I am not satisfied with results.
Soon, I became bored with this workflow (In fact, I kept this for quite a long time.). However, I suddenly forgot to record key information manually. As a result, I had to navigate in the history output of the the terminal slowly.