mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-05 23:38:42 +08:00
Enable viewer with eval (#1474)
This commit is contained in:
1 parent
3066819241
commit
27eb33f491
2 files changed
+11
-7
No files matched your search
@@ -69,7 +69,7 @@ class ExperimentConfig(InstantiateConfig):
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
"""Dictionary of optimizer groups and their schedulers"""
|
"""Dictionary of optimizer groups and their schedulers"""
|
||||||
vis: Literal["viewer", "wandb", "tensorboard"] = "wandb"
|
vis: Literal["viewer", "wandb", "tensorboard", "viewer+wandb", "viewer+tensorboard"] = "wandb"
|
||||||
"""Which visualizer to use."""
|
"""Which visualizer to use."""
|
||||||
data: Optional[Path] = None
|
data: Optional[Path] = None
|
||||||
"""Alias for --pipeline.datamanager.dataparser.data"""
|
"""Alias for --pipeline.datamanager.dataparser.data"""
|
||||||
@@ -78,15 +78,15 @@ class ExperimentConfig(InstantiateConfig):
|
|||||||
|
|
||||||
def is_viewer_enabled(self) -> bool:
|
def is_viewer_enabled(self) -> bool:
|
||||||
"""Checks if a viewer is enabled."""
|
"""Checks if a viewer is enabled."""
|
||||||
return "viewer" == self.vis
|
return ("viewer" == self.vis) | ("viewer+wandb" == self.vis) | ("viewer+tensorboard" == self.vis)
|
||||||
|
|
||||||
def is_wandb_enabled(self) -> bool:
|
def is_wandb_enabled(self) -> bool:
|
||||||
"""Checks if wandb is enabled."""
|
"""Checks if wandb is enabled."""
|
||||||
return "wandb" == self.vis
|
return ("wandb" == self.vis) | ("viewer+wandb" == self.vis)
|
||||||
|
|
||||||
def is_tensorboard_enabled(self) -> bool:
|
def is_tensorboard_enabled(self) -> bool:
|
||||||
"""Checks if tensorboard is enabled."""
|
"""Checks if tensorboard is enabled."""
|
||||||
return "tensorboard" == self.vis
|
return ("tensorboard" == self.vis) | ("viewer+tensorboard" == self.vis)
|
||||||
|
|
||||||
def set_timestamp(self) -> None:
|
def set_timestamp(self) -> None:
|
||||||
"""Dynamically set the experiment timestamp"""
|
"""Dynamically set the experiment timestamp"""
|
||||||
|
|||||||
@@ -252,10 +252,14 @@ class Trainer:
|
|||||||
@check_main_thread
|
@check_main_thread
|
||||||
def _check_viewer_warnings(self) -> None:
|
def _check_viewer_warnings(self) -> None:
|
||||||
"""Helper to print out any warnings regarding the way the viewer/loggers are enabled"""
|
"""Helper to print out any warnings regarding the way the viewer/loggers are enabled"""
|
||||||
if self.config.is_viewer_enabled():
|
if (
|
||||||
|
self.config.is_viewer_enabled()
|
||||||
|
and not self.config.is_tensorboard_enabled()
|
||||||
|
and not self.config.is_wandb_enabled()
|
||||||
|
):
|
||||||
string = (
|
string = (
|
||||||
"[NOTE] Not running eval iterations since only viewer is enabled."
|
"[NOTE] Not running eval iterations since only viewer is enabled.\n"
|
||||||
" Use [yellow]--vis wandb[/yellow] or [yellow]--vis tensorboard[/yellow] to run with eval instead."
|
"Use [yellow]--vis {wandb, tensorboard, viewer+wandb, viewer+tensorboard}[/yellow] to run with eval."
|
||||||
)
|
)
|
||||||
CONSOLE.print(f"{string}")
|
CONSOLE.print(f"{string}")
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user