quick fix

This commit is contained in:
hobogalaxy committed 2020-12-07 01:04:48 +01:00
1 parent bb17958c0a
commit 8b8acc1b0e
3 files changed
+5 -3

No files matched your search

+1 -2
View File
@@ -16,8 +16,7 @@ def init_lit_model(hparams: dict) -> pl.LightningModule:
def init_data_module(hparams: dict) -> pl.LightningDataModule:
"""Load DataModule from folder specified in run config."""
module_path = "data_modules." + hparams["datamodule_folder"] + ".datamodule"
if "data_dir" not in hparams:
hparams["data_dir"] = os.path.join(os.path.dirname(os.path.dirname(__file__)), "data")
hparams["data_dir"] = os.path.join(os.path.dirname(os.path.dirname(__file__)), "data")
datamodule = importlib.import_module(module_path).DataModule(hparams=hparams)
datamodule.prepare_data()
datamodule.setup()