marrrcin
04/13/2023, 10:41 AM.get
method of the config loader behaves differently between ConfigLoader
and OmegaConfigLoader
?
cl = ConfigLoader("conf")
cl.get("custom*")
{'test': ':)'}
cl = OmegaConfigLoader("conf")
cl.get("custom*")
None
ConfigLoader
works well without manually setting config_patterns
in the CONFIG_LOADER_ARGS
, which is useful for reading config in our plugins, but when the user opts-in into OmegaConfigLoader, it breaks the functionality unless one fixes the argsdatajoely
04/13/2023, 10:52 AMMerel
04/13/2023, 10:54 AMOmegaConfigLoader
we put an explicit check:
if key not in self.config_patterns:
raise KeyError(
f"No config patterns were found for '{key}' in your config loader"
)
IMO the ConfigLoader
has a lot of loose parts where we never fully check things making some behaviour very hard to debug.marrrcin
04/13/2023, 10:56 AMMerel
04/13/2023, 11:07 AMsettings.py
? Because then that’s where they’re able to supply additional patterns. I get this isn’t as smooth a journey as before.marrrcin
04/13/2023, 11:09 AMMerel
04/13/2023, 11:15 AMmarrrcin
04/13/2023, 11:17 AMAbstractConfigLoader
only has conf_source
Merel
04/13/2023, 11:33 AMAbstractConfigLoader
is a whole other story.. it really isn’t designed well. It’s not possible to create a functioning config loader if you just subclass that.marrrcin
04/13/2023, 11:35 AM