From c3bf9bb925fcd8a23e842cc665d267efecde1cc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mochol=C3=AD?= Date: Mon, 6 Feb 2023 16:52:52 +0100 Subject: [PATCH] Clarify default epoch and step values in ModelCheckpoint --- src/lightning/pytorch/callbacks/model_checkpoint.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lightning/pytorch/callbacks/model_checkpoint.py b/src/lightning/pytorch/callbacks/model_checkpoint.py index 0513c122ee7ba..bc4fe28827d12 100644 --- a/src/lightning/pytorch/callbacks/model_checkpoint.py +++ b/src/lightning/pytorch/callbacks/model_checkpoint.py @@ -79,7 +79,8 @@ class ModelCheckpoint(Checkpoint): ... filename='{epoch}-{val_loss:.2f}-{other_metric:.2f}' ... ) - By default, filename is ``None`` and will be set to ``'{epoch}-{step}'``. + By default, filename is ``None`` and will be set to ``'{epoch}-{step}'``, where "epoch" and "step" match + the number of finished epoch and optimizer steps respectively. monitor: quantity to monitor. By default it is ``None`` which saves a checkpoint only for the last epoch. verbose: verbosity mode. Default: ``False``. save_last: When ``True``, saves an exact copy of the checkpoint to a file `last.ckpt` whenever a checkpoint