app config bug fix: (#1833)

* app config bug fix:

When reading a config file that included per_dataset_config,
the dataroot specializations were applied, but not the default config.
This PR fixes that and also includes a test for this case.
This commit is contained in:
bmccandless
2020-09-14 13:15:47 -07:00
committed by GitHub
parent 6a7ae8bc8e
commit 342a9d774c
2 changed files with 46 additions and 1 deletions
+4 -1
View File
@@ -100,7 +100,10 @@ class AppConfig(object):
per_dataset_config = config.get("per_dataset_config", {})
for key, dataroot_config in per_dataset_config.items():
self.add_dataroot_config(key, **dataroot_config)
# first create and initialize the dataroot with the default config
self.add_dataroot_config(key, **config["dataset"])
# then apply the per dataset configuration
self.dataroot_config[key].update_from_config(dataroot_config, f"per_dataset_config__{key}")
self.is_complete = False