Skip to content

Commit 1f4ad5f

Browse files
committed
default behavior
1 parent fd05897 commit 1f4ad5f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/lightning/pytorch/callbacks/model_checkpoint.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,13 @@ class ModelCheckpoint(Checkpoint):
133133
will only save checkpoints at epochs 0 < E <= N
134134
where both values for ``every_n_epochs`` and ``check_val_every_n_epoch`` evenly divide E.
135135
save_on_train_epoch_end: Whether to run checkpointing at the end of the training epoch.
136-
If this is ``False``, then the check runs at the end of the validation.
136+
If ``False``, then the check runs at the end of the validation.
137+
If ``None`` and ``check_val_every_n_epoch != 1``, checkpointing will not be performed at the end of
138+
every training epoch. If there are no validation batches of data, checkpointing will occur at the
139+
end of the training epoch. If there is a non-default number of validation runs per training epoch
140+
(``val_check_interval != 1``), checkpointing is performed after validation.
137141
enable_version_counter: Whether to append a version to the existing file name.
138-
If this is ``False``, then the checkpoint files will be overwritten.
142+
If ``False``, then the checkpoint files will be overwritten.
139143
140144
Note:
141145
For extra customization, ModelCheckpoint includes the following attributes:

0 commit comments

Comments
 (0)