Skip to content

Commit e5b0498

Browse files
committed
remove trainling braket from shoukd_save_on_eception condition
1 parent 02477d5 commit e5b0498

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lightning/pytorch/callbacks/model_checkpoint.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,13 +438,13 @@ def _should_skip_saving_checkpoint(self, trainer: "pl.Trainer") -> bool:
438438
or trainer.sanity_checking # don't save anything during sanity check
439439
or self._last_global_step_saved == trainer.global_step # already saved at the last step
440440
)
441-
441+
442442
def _should_save_on_exception(self, trainer: "pl.Trainer") -> bool:
443443
return (
444444
self.save_on_exception
445445
and not bool(trainer.fast_dev_run) # disable checkpointing with fast_dev_run
446446
and not trainer.sanity_checking # don't save anything during sanity check
447-
and not self._last_global_step_saved == trainer.global_step # already saved at the last step)
447+
and not self._last_global_step_saved == trainer.global_step # already saved at the last step
448448
)
449449

450450
def _should_save_on_train_epoch_end(self, trainer: "pl.Trainer") -> bool:

0 commit comments

Comments
 (0)