Skip to content

Commit 5d7841c

Browse files
committed
Remove compilations
They did not play nice with lightning
1 parent 707f3e3 commit 5d7841c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/stamp/modeling/train.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,11 @@ def train_model_(
179179
logger=CSVLogger(save_dir=output_dir),
180180
)
181181
trainer.fit(
182-
model=cast(lightning.LightningModule, torch.compile(model)),
182+
model=model,
183183
train_dataloaders=train_dl,
184184
val_dataloaders=valid_dl,
185185
)
186-
shutil.move(model_checkpoint.best_model_path, output_dir / "model.ckpt")
186+
shutil.copy(model_checkpoint.best_model_path, output_dir / "model.ckpt")
187187

188188
return LitVisionTransformer.load_from_checkpoint(model_checkpoint.best_model_path)
189189

0 commit comments

Comments
 (0)