mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-03 22:38:48 +08:00
Fix viewer quit-on-train-completion (#1885)
This commit is contained in:
1 parent
63c6303736
commit
f299098f46
1 file changed
+3
-3
@@ -299,7 +299,8 @@ class Trainer:
|
|||||||
table.add_row("Checkpoint Directory", str(self.checkpoint_dir))
|
table.add_row("Checkpoint Directory", str(self.checkpoint_dir))
|
||||||
CONSOLE.print(Panel(table, title="[bold][green]:tada: Training Finished :tada:[/bold]", expand=False))
|
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
|
@check_main_thread
|
||||||
def _check_viewer_warnings(self) -> None:
|
def _check_viewer_warnings(self) -> None:
|
||||||
@@ -344,8 +345,7 @@ class Trainer:
|
|||||||
def _train_complete_viewer(self) -> None:
|
def _train_complete_viewer(self) -> None:
|
||||||
"""Let the viewer know that the training is complete"""
|
"""Let the viewer know that the training is complete"""
|
||||||
assert self.viewer_state is not None
|
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:
|
try:
|
||||||
self.viewer_state.training_complete()
|
self.viewer_state.training_complete()
|
||||||
except RuntimeError:
|
except RuntimeError:
|
||||||
|
|||||||
Reference in new issue
Block a user