Skip to content

Commit 701fb6a

Browse files
committed
update
1 parent 64adc55 commit 701fb6a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pytorch_lightning/plugins/training_type/deepspeed.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,8 @@ def lightning_restore_optimizer_and_schedulers(self) -> bool:
746746
return False
747747

748748
def load_model_state_dict(self, checkpoint: Mapping[str, Any]) -> None:
749+
if "state_dict" not in checkpoint and self._has_loaded_state_dict:
750+
return
749751
# override to do nothing, deepspeed engine already loaded the weights in `load_checkpoint()`
750752
if self.load_full_weights and self.zero_stage_3:
751753
self.model_to_device()

0 commit comments

Comments
 (0)