Raise a WARNING when someone tried to load the best checkpoint when one has not been set. #12501
Labels
callback: model checkpoint
design
Includes a design discussion
won't fix
This will not be worked on
working as intended
Working as intended
🚀 Feature
Raise a WARNING when someone call:
Trainer.test(ckpt_path='best')
or
Trainer.test(ckpt_path='best')
if there is no user-defined ModelCheckpoint in callbacks
Motivation
I'm frustrated when there is a deadline approaching, and I need to update my PL to the latest version, and it breaks a bunch of things, and one of thing that silently break is the model checkpointing.
If someone is calling
Trainer.test(ckpt_path='best')
they are expecting the best model to be loaded, not the latest model. If it is loading the latest model instead (due to user-defined ModelCheckpoint was not set), please raise a warning and not just silently load the latest model. Freaked me out real bad, I literally lost sleep over this.Pitch
Raise a WARNING when someone call:
Trainer.test(ckpt_path='best')
or
Trainer.test(ckpt_path='best')
if there is no user-defined ModelCheckpoint in callbacks
Alternatives
None
Additional context
None
cc @tchaton @justusschock @awaelchli @Borda @ananthsub @ninginthecloud @rohitgr7 @carmocca @jjenniferdai
The text was updated successfully, but these errors were encountered: