Skip to content

Commit

Permalink
update assertion and add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
awaelchli committed Jan 4, 2022
1 parent a8ed671 commit 26766bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/strategies/test_deepspeed_strategy.py
Expand Up @@ -558,8 +558,9 @@ def on_load_checkpoint(self, checkpoint: Dict[str, Any]) -> None:
if not hasattr(self, "model"):
self.configure_sharded_model()

# Lightning saves the lr schedulers, but DeepSpeed saves the optimizer states separately
assert len(checkpoint["lr_schedulers"]) == 1
assert len(checkpoint["optimizer_states"]) == 1
assert len(checkpoint["optimizer_states"]) == 0


class ManualModelParallelClassificationModel(ModelParallelClassificationModel):
Expand Down

0 comments on commit 26766bb

Please sign in to comment.