Is it possible to know within the LighthingModule the total number of training steps? I.e , what's going to be the value of self.trainer.global_step at the end of the training? I would need this info to set T_max in CosineAnnealingLR.
One possibility is setting the max_steps parameter in Trainer.
Just make sure the number of steps will be greater than max_epochs, otherwise, it will complete early!
Got it, thanks for your reply. So max_steps should be computed based on the number of epochs, the batch size and the number GPUs, somewhere before instantiating the Trainer. It would be useful to have a function in the Trainer that does that.
This issue has been automatically marked as stale because it hasn't had any recent activity. This issue will be closed in 7 days if no further activity occurs. Thank you for your contributions, Pytorch Lightning Team!
Most helpful comment
Got it, thanks for your reply. So
max_stepsshould be computed based on the number of epochs, the batch size and the number GPUs, somewhere before instantiating theTrainer. It would be useful to have a function in theTrainerthat does that.