Fix divide by zero when train util set to 1 (#1757)

* fix divide by zero when train util set to 1

* Run black

---------

Co-authored-by: Brent Yi <yibrenth@gmail.com>
This commit is contained in:
Dylan HuandBrent Yi authored and GitHub committed 2023-04-17 23:33:54 -07:00
1 parent c1c7a3b283
commit 797e9012fb
1 file changed
+1 -1
+1 -1
View File
@@ -303,7 +303,7 @@ class ViewerState:
if self.camera_message is None:
return
if self.trainer is not None and self.trainer.is_training:
if self.trainer is not None and self.trainer.is_training and self.control_panel.train_util != 1:
if (
EventName.TRAIN_RAYS_PER_SEC.value in GLOBAL_BUFFER["events"]
and EventName.VIS_RAYS_PER_SEC.value in GLOBAL_BUFFER["events"]