Skip to content

Commit 97695ae

Browse files
authored
Apply suggestions from code review
1 parent f5f5e58 commit 97695ae

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/lightning/pytorch/trainer/connectors/checkpoint_connector.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def resume_start(self, checkpoint_path: Optional[_PATH] = None, weights_only: Op
8080

8181
rank_zero_info(f"Restoring states from the checkpoint path at {checkpoint_path}")
8282
with pl_legacy_patch():
83-
loaded_checkpoint = self.trainer.strategy.load_checkpoint(checkpoint_path, weights_only)
83+
loaded_checkpoint = self.trainer.strategy.load_checkpoint(checkpoint_path, weights_only=weights_only)
8484
self._loaded_checkpoint = _pl_migrate_checkpoint(loaded_checkpoint, checkpoint_path)
8585

8686
def _select_ckpt_path(
@@ -407,7 +407,7 @@ def _restore_modules_and_callbacks(
407407
self, checkpoint_path: Optional[_PATH] = None, weights_only: Optional[bool] = None
408408
) -> None:
409409
# restore modules after setup
410-
self.resume_start(checkpoint_path, weights_only)
410+
self.resume_start(checkpoint_path, weights_only=weights_only)
411411
self.restore_model()
412412
self.restore_datamodule()
413413
self.restore_callbacks()

src/lightning/pytorch/trainer/trainer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ def predict(
913913
self.state.status = TrainerStatus.RUNNING
914914
self.predicting = True
915915
return call._call_and_handle_interrupt(
916-
self, self._predict_impl, model, dataloaders, datamodule, return_predictions, ckpt_path, weights_only
916+
self, self._predict_impl, model, dataloaders, datamodule, return_predictions, ckpt_path, weights_only=weights_only
917917
)
918918

919919
def _predict_impl(

0 commit comments

Comments
 (0)