File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/lightning/pytorch/trainer Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -562,8 +562,6 @@ def fit(
562562 _verify_strategy_supports_compile (model , self .strategy )
563563 self .state .fn = TrainerFn .FITTING
564564 self .state .status = TrainerStatus .RUNNING
565- if _is_registry (ckpt_path ) and module_available ("litmodels" ):
566- download_model_from_registry (ckpt_path , self )
567565 self .training = True
568566 self .should_stop = False
569567 call ._call_and_handle_interrupt (
@@ -580,6 +578,9 @@ def _fit_impl(
580578 ) -> None :
581579 log .debug (f"{ self .__class__ .__name__ } : trainer fit stage" )
582580
581+ if _is_registry (ckpt_path ) and module_available ("litmodels" ):
582+ download_model_from_registry (ckpt_path , self )
583+
583584 # if a datamodule comes in as the second arg, then fix it for the user
584585 if isinstance (train_dataloaders , LightningDataModule ):
585586 datamodule = train_dataloaders
You can’t perform that action at this time.
0 commit comments