You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, base_env and default_run_env is not included in the __repr__.
When it is printed, it shows something like this
In [11]: c
Out[11]: OmegaConfigLoader(conf_source=/Users/Nok_Lam_Chan/dev/kedro-inspect/demo-project/conf, env=None, config_patterns={'catalog': ['catalog*', 'catalog*/', '/catalog*'], 'parameters': ['parameters*', 'parameters*/', '/parameters*'], 'credentials': ['credentials*', 'credentials*/', '/credentials*'], 'globals': ['globals.yml']})
Context
Even it inherits from UserDict, but the dictionary interface seems broken. For example:
for key in config_loader.keys():
print(key)
will print nothing even though config_loader["parameters"] exist. For the context, I was trying to build a plugin that iterate the config loader and "compile" the configuration.
In addition, if __repr__ is removed, the config_loader will be printed as if it is a "dictionary". Right now it always print the __repr__ regardless of the keys, values, items or print method.
The text was updated successfully, but these errors were encountered:
noklam
changed the title
OmegaConfigLoader's __repr__ is not implemented correctly
OmegaConfigLoader's __repr__ is not implemented correctly, and it does not behave similar to a UserDictFeb 12, 2024
noklam
changed the title
OmegaConfigLoader's __repr__ is not implemented correctly, and it does not behave similar to a UserDict
[DRAFT] - OmegaConfigLoader's __repr__ is not implemented correctly, and it does not behave similar to a UserDictFeb 22, 2024
noklam
changed the title
[DRAFT] - OmegaConfigLoader's __repr__ is not implemented correctly, and it does not behave similar to a UserDict
OmegaConfigLoader's __repr__ is not implemented correctly, and it does not behave similar to a UserDictJul 25, 2024
Description
Currently,
base_env
anddefault_run_env
is not included in the__repr__
.When it is printed, it shows something like this
Context
Even it inherits from
UserDict
, but the dictionary interface seems broken. For example:will print nothing even though
config_loader["parameters"]
exist. For the context, I was trying to build a plugin that iterate the config loader and "compile" the configuration.I need to use a workaround looks like this:
In addition, if
__repr__
is removed, the config_loader will be printed as if it is a "dictionary". Right now it always print the__repr__
regardless of thekeys
,values
,items
orprint
method.Cc @merelcht
The text was updated successfully, but these errors were encountered: