Skip to content

Commit

Permalink
fix rename error when checkpoint name has '_'
Browse files Browse the repository at this point in the history
  • Loading branch information
TsumiNa committed May 24, 2021
1 parent b3fb46f commit f8d7a51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xenonpy/model/training/extension/persist.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def on_checkpoint(self, checkpoint: Trainer.checkpoint_tuple, trainer: Trainer)
if self.only_best_states:
tmp = checkpoint.id.split('_')
if tmp[-1] == '1':
key = tmp[0]
key = '_'.join(tmp)
value = deepcopy(checkpoint._asdict())
self._checker.set_checkpoint(**{key: value})
else:
Expand Down

0 comments on commit f8d7a51

Please sign in to comment.