Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
# https://pytorch-lightning.readthedocs.io/en/latest/api/pytorch_lightning.callbacks.ModelCheckpoint.html | |
# Save the model periodically by monitoring a quantity. | |
# Look at the above link for more detailed information. | |
model_checkpoint: | |
_target_: lightning.pytorch.callbacks.ModelCheckpoint | |
dirpath: ${paths.output_dir} # directory to save the model file | |
filename: "checkpoints/epoch_{epoch:03d}" # checkpoint filename | |
monitor: ${eval:'"val/loss" if ${data.train_val_test_split}[1] else "train/loss"'} # name of the logged metric which determines when model is improving | |
verbose: False # verbosity mode | |
save_last: True # additionally always save an exact copy of the last checkpoint to a file last.ckpt | |
save_top_k: 1 # save k best models (determined by above metric) | |
mode: "min" # "max" means higher metric value is better, can be also "min" | |
auto_insert_metric_name: False # when True, the checkpoints filenames will contain the metric name | |
save_weights_only: False # if True, then only the model’s weights will be saved | |
every_n_train_steps: null # number of training steps between checkpoints | |
train_time_interval: null # checkpoints are monitored at the specified time interval | |
every_n_epochs: null # number of epochs between checkpoints | |
save_on_train_epoch_end: null # whether to run checkpointing at the end of the training epoch or the end of validation | |