Skip to content

Commit c482ae3

Browse files
talregevBorda
andauthored
[Docs] Example for auto_insert_metric_name (#12649)
Co-authored-by: Jirka Borovec <[email protected]>
1 parent 9d2773f commit c482ae3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pytorch_lightning/callbacks/model_checkpoint.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ class ModelCheckpoint(Callback):
102102
For example, ``filename='checkpoint_{epoch:02d}-{acc:02.0f}`` with epoch ``1`` and acc ``1.12`` will resolve
103103
to ``checkpoint_epoch=01-acc=01.ckpt``. Is useful to set it to ``False`` when metric names contain ``/``
104104
as this will result in extra folders.
105+
For example, ``filename='epoch={epoch}-step={step}-val_acc={val/acc:.2f}', auto_insert_metric_name=False``
105106
save_weights_only: if ``True``, then only the model's weights will be
106107
saved. Otherwise, the optimizer states, lr-scheduler states, etc are added in the checkpoint too.
107108
every_n_train_steps: Number of training steps between checkpoints.

0 commit comments

Comments
 (0)