Check main thread when always rendering. (#865)

Check main thread
This commit is contained in:
Thomas Wang authored and GitHub committed 2022-11-01 00:45:20 +01:00
1 parent ddd7fc1d42
commit d9f6426e0d
1 file changed
+2
+2
View File
@@ -174,12 +174,14 @@ class Trainer:
self.save_checkpoint(step)
self._always_render(step)
@check_main_thread
def _always_render(self, step):
if self.config.is_viewer_enabled():
while True:
self.viewer_state.vis["renderingState/isTraining"].write(False)
self._update_viewer_state(step)
@check_main_thread
def _check_viewer_warnings(self) -> None:
"""Helper to print out any warnings regarding the way the viewer/loggers are enabled"""
if self.config.is_viewer_enabled():