Skip to content

Commit

Permalink
Update engine.py (microsoft#458)
Browse files Browse the repository at this point in the history
Do not load optimizer states for fp32 if flag set to False.
  • Loading branch information
Zixxy authored Oct 5, 2020
1 parent 9557557 commit 6717638
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deepspeed/runtime/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,7 @@ def _load_checkpoint(self,
self.optimizer.load_state_dict(
checkpoint['optimizer'],
load_optimizer_states=load_optimizer_states)
else:
elif load_optimizer_states:
self.optimizer.load_state_dict(checkpoint['optimizer'])

if load_lr_scheduler_states and self.lr_scheduler is not None:
Expand Down

0 comments on commit 6717638

Please sign in to comment.