Skip to content
Snippets Groups Projects
Commit 0020477a authored by Myle Ott's avatar Myle Ott Committed by Facebook Github Bot
Browse files

Don't reload best validation loss when using --reset-optimizer

Summary: Pull Request resolved: https://github.com/pytorch/fairseq/pull/661

Differential Revision: D15068312

Pulled By: myleott

fbshipit-source-id: 1216835fd4c7f83ea5e350bff83901c93ac57447
parent fa52d202
No related branches found
No related tags found
No related merge requests found
......@@ -362,7 +362,7 @@ def load_checkpoint(args, trainer, epoch_itr):
trainer.lr_step(epoch_itr.epoch)
trainer.lr_step_update(trainer.get_num_updates())
if 'best' in extra_state:
if 'best' in extra_state and not args.reset_optimizer:
save_checkpoint.best = extra_state['best']
return True
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment