move outputs to config (#545)

This commit is contained in:
evonneng authored and GitHub committed 2022-09-26 13:55:09 -07:00
1 parent 99d0f43ff2
commit 399e5cac6d
1 file changed
+3 -1
+3 -1
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"""