Start viewer with more accurate speed calculation (#899)

Start viewer with more accurate speed calc
This commit is contained in:
Matthew Tancik authored and GitHub committed 2022-11-04 17:30:29 -07:00
1 parent 93839ca3f0
commit 71601f304f
1 file changed
+8 -6
+8 -6
View File
@@ -149,12 +149,14 @@ class Trainer:
for callback in self.callbacks:
callback.run_callback_at_location(step, location=TrainingCallbackLocation.AFTER_TRAIN_ITERATION)
writer.put_time(
name=EventName.TRAIN_RAYS_PER_SEC,
duration=self.config.pipeline.datamanager.train_num_rays_per_batch / train_t.duration,
step=step,
avg_over_steps=True,
)
# Skip the first two steps to avoid skewed timings that break the viewer rendering speed estimate.
if step > 1:
writer.put_time(
name=EventName.TRAIN_RAYS_PER_SEC,
duration=self.config.pipeline.datamanager.train_num_rays_per_batch / train_t.duration,
step=step,
avg_over_steps=True,
)
self._update_viewer_state(step)