Remove dataparser dependency (#1529)

This commit is contained in:
Matthew Tancik authored and GitHub committed 2023-02-27 18:32:40 -08:00
1 parent 4a9764d3c4
commit bfaf11cd72
6 files changed
+103 -49

No files matched your search

+7 -4
View File
@@ -72,7 +72,7 @@ class ExperimentConfig(InstantiateConfig):
vis: Literal["viewer", "wandb", "tensorboard", "viewer+wandb", "viewer+tensorboard"] = "wandb"
"""Which visualizer to use."""
data: Optional[Path] = None
"""Alias for --pipeline.datamanager.dataparser.data"""
"""Alias for --pipeline.datamanager.data"""
relative_model_dir: Path = Path("nerfstudio_models/")
"""Relative path to save all checkpoints."""
@@ -96,9 +96,12 @@ class ExperimentConfig(InstantiateConfig):
def set_experiment_name(self) -> None:
"""Dynamically set the experiment name"""
if self.experiment_name is None:
datapath = self.pipeline.datamanager.dataparser.data
datapath = datapath.parent if datapath.is_file() else datapath
self.experiment_name = str(datapath).replace("../", "").replace("/", "-")
datapath = self.pipeline.datamanager.data
if datapath is not None:
datapath = datapath.parent if datapath.is_file() else datapath
self.experiment_name = str(datapath.stem)
else:
self.experiment_name = "unnamed"
def get_base_dir(self) -> Path:
"""Retrieve the base directory to set relative paths"""