Skip to content

Commit 9499e9e

Browse files
CopilotBorda
andcommitted
Remove unnecessary TODO comment in fit_loop.py
The TODO suggested moving max_steps check inside training loop, but this is correctly placed in fit_loop since global_step tracks steps across epochs and the fit_loop is responsible for deciding when to stop the entire fit process. Moving it would require additional flag variables, making the code more complex without any benefit. Co-authored-by: Borda <[email protected]>
1 parent b12bec5 commit 9499e9e

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/lightning/pytorch/loops/fit_loop.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ def done(self) -> bool:
176176
rank_zero_info("`Trainer.fit` stopped: No training batches.")
177177
return True
178178

179-
# TODO: Move track steps inside training loop and move part of these condition inside training loop
180179
stop_steps = _is_max_limit_reached(self.epoch_loop.global_step, self.max_steps)
181180
if stop_steps:
182181
rank_zero_info(f"`Trainer.fit` stopped: `max_steps={self.max_steps!r}` reached.")

0 commit comments

Comments
 (0)