Skip to content

Commit

Permalink
Add ckpt_path config to resume training (#67)
Browse files Browse the repository at this point in the history
Minor update to the training script, allowing for easy resumption of
training.

Co-authored-by: Juncheng Liu <[email protected]>
  • Loading branch information
gorold and liu-jc authored Jun 25, 2024
1 parent 92ddd74 commit fac7a93
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions cli/conf/finetune/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ run_name: ???
seed: 0
tf32: true
compile: false # set to mode: default, reduce-overhead, max-autotune
ckpt_path: null
trainer:
_target_: lightning.Trainer
accelerator: auto
Expand Down
1 change: 1 addition & 0 deletions cli/conf/pretrain/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ run_name: ???
seed: 0
tf32: true
compile: false # set to mode: default, reduce-overhead, max-autotune
ckpt_path: null # set to "last" to resume training
trainer:
_target_: lightning.Trainer
accelerator: auto
Expand Down
1 change: 1 addition & 0 deletions cli/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ def main(cfg: DictConfig):
trainer.fit(
model,
datamodule=DataModule(cfg, train_dataset, val_dataset),
ckpt_path=cfg.ckpt_path,
)


Expand Down

0 comments on commit fac7a93

Please sign in to comment.