Fix viewer quit-on-train-completion (#1885)

This commit is contained in:
Matthew Tancik authored and GitHub committed 2023-05-08 11:48:28 -07:00
1 parent 63c6303736
commit f299098f46
1 file changed
+3 -3
+3 -3
View File
@@ -299,7 +299,8 @@ class Trainer:
table.add_row("Checkpoint Directory", str(self.checkpoint_dir))
CONSOLE.print(Panel(table, title="[bold][green]:tada: Training Finished :tada:[/bold]", expand=False))
self._train_complete_viewer()
if not self.config.viewer.quit_on_train_completion:
self._train_complete_viewer()
@check_main_thread
def _check_viewer_warnings(self) -> None:
@@ -344,8 +345,7 @@ class Trainer:
def _train_complete_viewer(self) -> None:
"""Let the viewer know that the training is complete"""
assert self.viewer_state is not None
if not self.config.viewer.quit_on_train_completion:
self.training_state = "completed"
self.training_state = "completed"
try:
self.viewer_state.training_complete()
except RuntimeError: