Avoid zero duration crash (#2193)

Avoid zero duration divide-by-zero crash when processing too quickly.
This commit is contained in:
machenmusik authored and GitHub committed 2023-07-10 22:09:44 +00:00
1 parent b86a4251a9
commit 82b3f70f87
1 file changed
+1 -1
+1 -1
View File
@@ -266,7 +266,7 @@ class Trainer:
name=EventName.TRAIN_RAYS_PER_SEC,
duration=self.world_size
* self.pipeline.datamanager.get_train_rays_per_batch()
/ train_t.duration,
/ max(0.001, train_t.duration),
step=step,
avg_over_steps=True,
)