Skip to content

Commit

Permalink
Fix: number of iterations wasn't set correctly (num_iterations direct…
Browse files Browse the repository at this point in the history
…ly set to equal to max_num_iterations) (#3526)

Fix: number of iterations wasn't set correctly

The original code causes iteration to go over max_num_iterations, causing progress tracker be unable to estimate time needed to finish, and causes unwanted extra iterations
  • Loading branch information
preacherwhite authored Nov 28, 2024
1 parent 11ca6e3 commit 4d73c4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nerfstudio/engine/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def train(self) -> None:

self._init_viewer_state()
with TimeWriter(writer, EventName.TOTAL_TRAIN_TIME):
num_iterations = self.config.max_num_iterations
num_iterations = self.config.max_num_iterations - self._start_step
step = 0
self.stop_training = False
for step in range(self._start_step, self._start_step + num_iterations):
Expand Down

0 comments on commit 4d73c4e

Please sign in to comment.