Woefully split logging concerns - How do I log the metrics I want? #7785
Unanswered
nervecenter
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 2 comments 1 reply
-
The learning rate monitor seems to act like a callback so try passing it into the callback hook in the trainer.. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Also you don't need to manually do all this ..you can simply use self.log() for both the training and Val averages |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've been trying to grapple with systems such as
CSVLogger
,LearningRateMonitor
, and thetraining_epoch_end()
andvalidation_epoch_end()
methods. Everything seems horribly split, to the point whereLearningRateMonitor
is passed in as a callback, while normal logger objects are passed in to theTrainer
, and they can't talk to theLearningRateMonitor
; 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.
Beta Was this translation helpful? Give feedback.
All reactions