Skip to content

Commit 5fd675c

Browse files
Alan ChuAlan Chu
authored andcommitted
call configure_module before freeze_before_training
1 parent 3627c5b commit 5fd675c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/lightning/pytorch/callbacks/finetuning.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,9 @@ def unfreeze_and_add_param_group(
274274

275275
@override
276276
def setup(self, trainer: "pl.Trainer", pl_module: "pl.LightningModule", stage: str) -> None:
277+
if hasattr(pl_module, "configure_model"):
278+
pl_module.configure_model()
279+
277280
self.freeze_before_training(pl_module)
278281

279282
from lightning.pytorch.strategies import DeepSpeedStrategy

0 commit comments

Comments
 (0)