What replacement variables are available to filename in the ModelCheckpoint callback in Pytorch Lightning
What replacement variables {replace_me} are available to populate the filename attribute on the ModelCallback checkpoint in pytorch?
I want to pass the object_id hparam and the checkpoint version (the same as used to create the parent folder) ver like so:
pl.callbacks.ModelCheckpoint(filename='weights_{object_id:03}_{ver}_{epoch}-{step}')

# Saves to file:
# weights_object_id=000_ver=0_epoch=3-step=27


Arbitrary metrics which have been logged and {epoch} and {step} can be used, as shown in ModelCheckpoint.
Metrics can be logged during training (in your model class which extends LightningModule) like:
def training_step(self, batch, batch_idx):
    loss, logs = self.step(batch, batch_idx)
    self.log_dict(
        {f&quot;train_{k}&quot;: v for k, v in logs.items()},
        on_step=True,
        on_epoch=True
    )
    return loss

If you want additional variables, which aren't logged, extend ModelCheckpoint and override the format_checkpoint_name() method.
