We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f2cd64f commit 048ad86Copy full SHA for 048ad86
src/lightning/pytorch/callbacks/model_checkpoint.py
@@ -563,7 +563,7 @@ def _format_checkpoint_name(
563
self,
564
filename: Optional[str],
565
metrics: dict[str, Tensor],
566
- prefix: str = "",
+ prefix: Optional[str] = None,
567
auto_insert_metric_name: bool = True,
568
) -> str:
569
if not filename:
@@ -590,7 +590,7 @@ def _format_checkpoint_name(
590
metrics[name] = torch.tensor(0)
591
filename = filename.format(metrics)
592
593
- if prefix:
+ if prefix is not None:
594
filename = self.CHECKPOINT_JOIN_CHAR.join([prefix, filename])
595
596
return filename
0 commit comments