Skip to content

Commit

Permalink
bug fix in BaseCheckpointer (pytorch#676)
Browse files Browse the repository at this point in the history
Summary:

When retrieving the checkpoint dirpaths, need to account for metadata file.

Reviewed By: galrotem

Differential Revision: D52715846
  • Loading branch information
JKSenthil authored and facebook-github-bot committed Jan 16, 2024
1 parent ec8bb7b commit 5b5b10d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchtnt/framework/callbacks/base_checkpointer.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def __init__(
self._keep_last_n_checkpoints = keep_last_n_checkpoints
self._ckpt_dirpaths: List[str] = []
if self._keep_last_n_checkpoints:
ckpt_dirpaths = get_checkpoint_dirpaths(dirpath)
ckpt_dirpaths = get_checkpoint_dirpaths(dirpath, self.metadata_fname)
self._ckpt_dirpaths = _sort_by_recency(ckpt_dirpaths)
self._process_group = process_group
self._pg_wrapper = PGWrapper(process_group)
Expand Down

0 comments on commit 5b5b10d

Please sign in to comment.