Save checkpoints without overwrite
Hi there,
I am using the ModelCheckpoint callback to save my model every n epochs but I cannot find a way to prevent PL from overwriting/deleting the previous checkpoint.
Ideally, I would like to keep the default naming convention {epoch}-{step} but without losing previous checkpoints.
Thanks
you can create a custom ModelCheckpoint instance with save_top_k=-1 and pass it in inside Trainer callbacks.
ckpt_callback = ModelCheckpoint(save_top_k=-1, ...)
trainer = Trainer(callbacks=[ckpt_callback], ...)