Checkpoint naming broken
🐛 Bug
I would like to be able to save checkpoints with custom names that include the value of my val_loss, ie. path/epoch_2-val_loss_0.2.hdf5 . The documentation for ModelCheckpoint suggests that this is possible using the filepath argument. This does not appear to be the case, since the source code calls os.mkdirs(filepath). I have also tried using the prefix argument, but it doesn't seem to be possible to pass it a format string containing a variable.
Expected behavior
The documentation claims that filepath='{epoch:02d}-{val_loss:.2f}.hdf5' will save a checkpoint at /path/epoch_2-val_loss_0.2.hdf5. Instead, it saves a checkpoint at {epoch:02d}-{val_loss:.2f}.hdf5/_ckpt_epoch_1.ckpt.
The issues in the documentation are two-fold:
-- It suggests that filepath can contain the directory + name of the checkpoint, when it seems like it should only contain the directory specifying where to save.
-- It suggests that it can 'contain named formatting options to be auto-filled', which also doesn't seem to be the case.
Is it possible to achieve this functionality with the prefix argument instead? If so, how?