Skip to content

Commit

Permalink
fix a bug in filtering checkpoints (NVIDIA#6851)
Browse files Browse the repository at this point in the history
Signed-off-by: Xin Yao <[email protected]>
  • Loading branch information
yaox12 authored Aug 8, 2023
1 parent a6e9e9f commit 1346272
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nemo/utils/callbacks/nemo_model_checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def nemo_topk_check_previous_run(self):
if checkpoint[-10:] == '-last.ckpt':
continue
index = checkpoint.find(self.monitor) + len(self.monitor) + 1 # Find monitor in str + 1 for '='
if index != -1:
if index != len(self.monitor):
match = re.search('[A-z]', checkpoint[index:])
if match:
value = checkpoint[index : index + match.start() - 1] # -1 due to separator hypen
Expand Down

0 comments on commit 1346272

Please sign in to comment.