@@ -634,12 +634,11 @@ def _setup_on_init(self) -> None:
634634 self .num_test_batches : List [Union [int , float ]] = []
635635 self .num_val_batches : List [Union [int , float ]] = []
636636 self .num_predict_batches : List [Union [int , float ]] = []
637-
637+
638638 self .test_dataloaders : Optional [List [DataLoader ]] = None
639639 self .val_dataloaders : Optional [List [DataLoader ]] = None
640640 self ._last_train_dl_reload_epoch = float ("-inf" )
641641 self ._last_val_dl_reload_epoch = float ("-inf" )
642-
643642
644643 def _call_and_handle_interrupt (self , trainer_fn : Callable , * args : Any , ** kwargs : Any ) -> Any :
645644 r"""
@@ -986,7 +985,7 @@ def _predict_impl(
986985 self .state .status = TrainerStatus .RUNNING
987986 self .predicting = True
988987
989- self .predict_loop .return_predictions = return_predictions # type: ignore
988+ self .predict_loop .return_predictions = return_predictions # type: ignore
990989
991990 # if a datamodule comes in as the second arg, then fix it for the user
992991 if isinstance (dataloaders , LightningDataModule ):
@@ -1451,7 +1450,7 @@ def __set_ckpt_path(self, ckpt_path: Optional[str], model_provided: bool, model_
14511450 " or last checkpoint available. No checkpoint will be loaded."
14521451 )
14531452 return None
1454- ckpt_path = max (candidates_ts .keys (), key = partial (operator .getitem , candidates_ts )) # type: ignore
1453+ ckpt_path = max (candidates_ts .keys (), key = partial (operator .getitem , candidates_ts )) # type: ignore
14551454
14561455 if not ckpt_path :
14571456 raise MisconfigurationException (
@@ -2128,7 +2127,7 @@ def data_parallel_device_ids(self) -> Optional[List[int]]:
21282127 return self .device_ids if isinstance (self .accelerator , CUDAAccelerator ) else None
21292128
21302129 @property
2131- def lightning_module (self ) -> "pl.LightningModule" : # type: ignore
2130+ def lightning_module (self ) -> "pl.LightningModule" : # type: ignore
21322131 # TODO: this is actually an optional return
21332132 assert self .strategy .lightning_module is not None
21342133 return self .strategy .lightning_module
0 commit comments