4
0
mirror of https://github.com/nerfstudio-project/nerfstudio.git synced 2026-11-11 02:24:38 +08:00

move outputs to config (#545)

This commit is contained in:
evonneng 2022-09-26 13:55:09 -07:00 committed by GitHub
parent 99d0f43ff2
commit 399e5cac6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -232,6 +232,8 @@ from nerfactory.pipelines.base import VanillaPipelineConfig
class Config(PrintableConfig):
"""Full config contents"""
output_dir: Path = Path("outputs")
"""relative or absolute output directory to save all checkpoints and logging"""
method_name: Optional[str] = None
"""Method name. Required to set in python or via cli"""
experiment_name: Optional[str] = None
@ -262,7 +264,7 @@ class Config(PrintableConfig):
# check the experiment and method names
assert self.method_name is not None, "Please set method name in config or via the cli"
self.set_experiment_name()
return Path(f"outputs/{self.experiment_name}/{self.method_name}/{self.timestamp}")
return Path(f"{self.output_dir}/{self.experiment_name}/{self.method_name}/{self.timestamp}")
def get_checkpoint_dir(self) -> Path:
"""Retrieve the checkpoint directory"""