Skip to content

Commit bf6b17d

Browse files
committed
Ensure int max_batch
1 parent c111f25 commit bf6b17d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/lightning/pytorch/loops/evaluation_loop.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,9 @@ def increment_progress_to_evaluation_end(self) -> None:
267267
if self.skip:
268268
return
269269
self.reset()
270-
max_batch = max(self.max_batches)
270+
max_batch = int(max(self.max_batches))
271+
if max_batch == -1:
272+
return
271273
self.batch_progress.increment_by(max_batch, True)
272274

273275
def on_run_start(self) -> None:

src/lightning/pytorch/loops/progress.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ def reset_on_run(self) -> None:
189189
def reset_on_restart(self) -> None:
190190
self.current.reset_on_restart()
191191

192-
@override
193192
def increment_by(self, n: int) -> None:
194193
self.total.increment_by(n)
195194
self.current.increment_by(n)

0 commit comments

Comments
 (0)