Skip to content

Commit c59ab40

Browse files
committed
Fix condition on batches that stepped
1 parent bf6b17d commit c59ab40

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/lightning/pytorch/loops/training_epoch_loop.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,7 @@ def reset(self) -> None:
190190
if (
191191
self.restarting
192192
and not self._should_accumulate()
193-
and self.restarted_on_train_batch_end
194-
or not self.restarted_on_last
193+
and (self.restarted_on_train_batch_end or not self.restarted_on_last)
195194
):
196195
# batches_that_stepped is never set prior to saving a checkpoint, even when saving
197196
# happens on_validation_end

0 commit comments

Comments
 (0)