Skip to content

Commit

Permalink
Update test_ddp_fully_sharded_with_full_state_dict.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ananthsub committed Sep 23, 2021
1 parent 732673e commit 2562888
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/plugins/test_ddp_fully_sharded_with_full_state_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ def configure_sharded_model(self) -> None:

def on_load_checkpoint(self, checkpoint: Dict[str, Any]) -> None:
# when loading full state dict, we first need to create a new unwrapped model
if self.layer is None or isinstance(self.layer, FullyShardedDataParallel):
self._init_model()
self._init_model()

def configure_optimizers(self):
return torch.optim.SGD(self.layer.parameters(), lr=0.1)
Expand Down

0 comments on commit 2562888

Please sign in to comment.