Open
Description
Description & Motivation
Tiny annoyance, but wouldn't it make sense to put the monitor value in the default value of the filename so it's not just epoch-X-step-y
by default?
Pitch
Couldn't something like this work here?
def _format_checkpoint_name(
self,
filename: Optional[str],
metrics: Dict[str, Tensor],
prefix: str = "",
auto_insert_metric_name: bool = True,
) -> str:
if not filename:
if self.monitor is not None and self.monitor in metrics:
filename = "{epoch}" + self.CHECKPOINT_JOIN_CHAR + "{step}" + self.CHECKPOINT_JOIN_CHAR + f"{{{self.monitor}}}"
# filename is not set, use default name
else:
filename = "{epoch}" + self.CHECKPOINT_JOIN_CHAR + "{step}"
Alternatives
No response
Additional context
Happy to put it in MR
cc @Borda