Checkpoints are overwritten automatically

Hi,

I’m new to pytorch lightning and trying to use the callback to save model checkpoints. But it only saved one file and overwrote it automatically. The code is the following:

checkpoint_callback = ModelCheckpoint(
    dirpath='./logs/', every_n_epochs=5, save_on_train_epoch_end=True, filename=None)
model = Pix2Pix(len(forcings), 1)

trainer = pl.Trainer(max_epochs=100, gpus=1,
                     gradient_clip_val=1., callbacks=[checkpoint_callback])
trainer.fit(model, loader)

If my understanding correctly, it should save checkpoints every 5 epochs so the files should be epoch=4.ckpt, epoch=9.ckpt, epoch=14.ckpt, etc., But I only get one file and it seems the previous ones are all overwritten.

Also the file name has apostrophes with it. Here is a screenshot of my current log directory.

Any suggestions would be appreciated!

It seems I missed the top_k parameter.