-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support reading checkpoints w/ metric values (#675)
Summary: # Context We want to support checkpointing best model in TorchTNT. This requires adding to the existing utils that handle reading checkpoints # This Diff 1. Adds `metric_name` arg to `_retrieve_checkpoint_dirpaths()` (and `get_checkpoint_dirpaths()`, its distributed equivalent), which is responsible for reading the appropriate checkpoint paths. It will append to its regex and only consider checkpoints that contain the metric name in their name 2. Adds `get_best_checkpoint_path()` method, adding a sibling to the `get_latest_checkpoint_path()` method when restoring checkpoints. It now supports sorting by metric value, alongside sorting by latest (which it could already do) # Next Diff Implement the best checkpoint feature using these utils Differential Revision: D52714747
- Loading branch information
1 parent
bb8ed78
commit cec0ed8
Showing
2 changed files
with
208 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters