-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Open
Labels
Description
Description & Motivation
There doesn't seem to be a straightforward way to get the training and validation metrics of the best model as monitored by ModelCheckpoint. Adding best_model_metrics attribute to ModelCheckpoint can be done easily in a way similar to how best_model_score works now.
Pitch
Accessing training and validation metrics of the best model checkpoint by accessing trainer.checkpoint_callback.best_model_metrics right after a trainer.fit call is useful for hyperparameter optimization if you want to optimize based on a validation metric or use other custom callbacks to summarize a batch experiment. I am willing to implement this feature.
Alternatives
- Running
trainer.teston the training and validation dataset again after atrainer.fitcall. - Getting records saved by loggers by checking the epoch number in the filename of a checkpoint file.
These two options create unnecessary overheads for a simple feature like this.
Additional context
semaphore-egg