Skip to content

Commit 4133bba

Browse files
committed
_fit_impl
1 parent c5896a6 commit 4133bba

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/lightning/pytorch/trainer/trainer.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)