Woefully split logging concerns - How do I log the metrics I want?

I’ve been trying to grapple with systems such as CSVLogger, LearningRateMonitor, and the training_epoch_end() and validation_epoch_end() methods. Everything seems horribly split, to the point where LearningRateMonitor is passed in as a callback, while normal logger objects are passed in to the Trainer, and they can’t talk to the LearningRateMonitor; the passed-in logger objects can’t even access the learning rate. Not to mention that manually writing metrics to a logger versus passing logging parameters to a logging object cause them to write mangled and interspersed data to file, rendering the log files a nightmare (or even impossible) to interpret.

All I want to do is write a simple CSV. At the end of each epoch, after validation, I want to record four columns: The epoch number; the average training loss; the average validation loss; the learning rate.

That’s it. I’ve been scouring the docs and it currently seems like it can’t be done.

I suggest use a logging platform such as neptune. The learningratemonitor will log the learning rate; and the other metrics can be logged in training_step and validation_step. All can be easily charted within neptune so you may not need a csv. However if really want one then you can query/download the metadata from neptune easily.