Skip to content

Commit

Permalink
Merge pull request #6 from uzh-rpg/resume-issue
Browse files Browse the repository at this point in the history
Fix missing Key in metadata when resuming training
  • Loading branch information
magehrig authored May 16, 2023
2 parents 4250ee4 + a368f2f commit 5774d5c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion loggers/wandb_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,10 @@ def _scan_and_log_checkpoints(self, checkpoint_callback: "ReferenceType[ModelChe
print(f'num_new_cktps = {num_new_cktps}')
break

self._rm_but_top_k(checkpoint_callback.save_top_k)
try:
self._rm_but_top_k(checkpoint_callback.save_top_k)
except KeyError:
pass

def _rm_but_top_k(self, top_k: int):
# top_k == -1: save all models
Expand Down

0 comments on commit 5774d5c

Please sign in to comment.