Fix logic when using filename datasets (#1510)

This commit is contained in:
Matthew Tancik authored and GitHub committed 2023-02-25 16:06:41 -08:00
1 parent 1916d9c85f
commit 5158cc36ff
2 files changed
+12 -4

No files matched your search

+3 -1
View File
@@ -96,7 +96,9 @@ class ExperimentConfig(InstantiateConfig):
def set_experiment_name(self) -> None:
"""Dynamically set the experiment name"""
if self.experiment_name is None:
self.experiment_name = str(self.pipeline.datamanager.dataparser.data).replace("../", "").replace("/", "-")
datapath = self.pipeline.datamanager.dataparser.data
datapath = datapath.parent if datapath.is_file() else datapath
self.experiment_name = str(datapath).replace("../", "").replace("/", "-")
def get_base_dir(self) -> Path:
"""Retrieve the base directory to set relative paths"""