How to remove version number when saving model checkpoint?
Hi. I trained a model several times,
and I found that Pytorch-lightning sometimes appends version, e.g. model-v1.ckpt, and sometimes doesn't append.
(I don't know the reason because the codes of the two situations are the same)
Here, I want to let PyTorch-lightning do not append any version. Is there any solution?
Hi, it happens when the checkpoint tries to save the file but a file with that name already exists. It is to prevent accidentally overwriting/deleting a checkpoint.
You can prevent that for example by setting the filename to include epoch and step, e.g.,
ModelCheckpoint(monitor=..., filename="your-filename-{epoch}-{step}")