Skip to content

Commit

Permalink
fixes bug causing finished runs to resume
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesfrye committed May 20, 2021
1 parent ede690f commit 4d79628
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/wandb_logging/wandb_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ def download_model_artifact(self, opt):
modeldir = model_artifact.download()
epochs_trained = model_artifact.metadata.get('epochs_trained')
total_epochs = model_artifact.metadata.get('total_epochs')
assert epochs_trained < total_epochs, 'training to %g epochs is finished, nothing to resume.' % (
total_epochs)
is_finished = total_epochs is None
assert not is_finished, 'training is finished, can only resume incomplete runs.'
return modeldir, model_artifact
return None, None

Expand Down

0 comments on commit 4d79628

Please sign in to comment.