4
0
mirror of https://github.com/nerfstudio-project/nerfstudio.git synced 2026-11-10 18:17:31 +08:00

Fix: number of iterations wasn't set correctly (num_iterations directly 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
This commit is contained in:
Daniel Wang 2024-11-28 14:50:37 -05:00 committed by GitHub
parent 11ca6e379e
commit 4d73c4e61e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -240,7 +240,7 @@ class Trainer:
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):