diff --git a/src/fibad/config_utils.py b/src/fibad/config_utils.py index 6c28e33..6f847a6 100644 --- a/src/fibad/config_utils.py +++ b/src/fibad/config_utils.py @@ -24,13 +24,13 @@ class ConfigDict(dict): __slots__ = () # we don't need __dict__ on this object at all. - def __init__(self, map: dict, **kwargs): - super().__init__(map, **kwargs) + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) # Replace all dictionary keys with values recursively. - for key in self: - if isinstance(self[key], dict) and not isinstance(self[key], ConfigDict): - self[key] = ConfigDict(map=self[key]) + for key, val in self.items(): + if isinstance(val, dict) and not isinstance(val, ConfigDict): + self[key] = ConfigDict(val) def __missing__(self, key): msg = f"Accessed configuration key/section {key} which has not been defined. " diff --git a/src/fibad/fibad_default_config.toml b/src/fibad/fibad_default_config.toml index ebba130..210d8f0 100644 --- a/src/fibad/fibad_default_config.toml +++ b/src/fibad/fibad_default_config.toml @@ -64,7 +64,7 @@ latent_dim =64 [data_set] # Name of the built-in data loader to use or the libpath to an external data loader # e.g. "user_package.submodule.ExternalDataLoader" or "HSCDataLoader" -name = "HSCDataLoader" +name = "HSCDataSet" [data_loader] # Pixel dimensions used to crop all images prior to loading. Will prune any images that are too small.