Skip to content

Commit

Permalink
scvi checkpointing adapt
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoe Piran authored and Zoe Piran committed Apr 26, 2024
1 parent e6c87e5 commit 921bde6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/biolord/_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ def train(

monitor = trainer_kwargs.pop("monitor", "val_biolord_metric")
save_ckpt_every_n_epoch = trainer_kwargs.pop("save_ckpt_every_n_epoch", 20)
enable_checkpointing = trainer_kwargs.pop("enable_checkpointing", True)
enable_checkpointing = trainer_kwargs.pop("enable_checkpointing", False)

trainer_kwargs["callbacks"] = [] if "callbacks" not in trainer_kwargs.keys() else trainer_kwargs["callbacks"]
if enable_checkpointing:
Expand Down Expand Up @@ -723,6 +723,7 @@ def train(
early_stopping_monitor=monitor,
early_stopping_mode="max",
enable_checkpointing=enable_checkpointing,
checkpointing_monitor=monitor,
**trainer_kwargs,
)

Expand Down

0 comments on commit 921bde6

Please sign in to comment.