Skip to content

Commit f16b771

Browse files
committed
remove exception prefix as this is already covert by last flag
1 parent c62f0e1 commit f16b771

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/lightning/pytorch/callbacks/model_checkpoint.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ class ModelCheckpoint(Checkpoint):
214214
CHECKPOINT_JOIN_CHAR = "-"
215215
CHECKPOINT_EQUALS_CHAR = "="
216216
CHECKPOINT_NAME_LAST = "last"
217-
CHECKPOINT_EXCEPTION_PREFIX = "exception"
218217
FILE_EXTENSION = ".ckpt"
219218
STARTING_VERSION = 1
220219

@@ -348,7 +347,7 @@ def on_exception(self, trainer: "pl.Trainer", pl_module: "pl.LightningModule", e
348347
if not self._should_save_on_exception(trainer):
349348
return
350349
monitor_candidates = self._monitor_candidates(trainer)
351-
filepath = self.format_checkpoint_name(metrics=monitor_candidates, prefix=self.CHECKPOINT_EXCEPTION_PREFIX)
350+
filepath = self.format_checkpoint_name(metrics=monitor_candidates)
352351
self._save_checkpoint(trainer, filepath)
353352
self._save_last_checkpoint(trainer, monitor_candidates)
354353
rank_zero_info(

0 commit comments

Comments
 (0)