-
Notifications
You must be signed in to change notification settings - Fork 922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix OmegaConfigLoader
__repr__ and missing keys method
#4030
Conversation
Signed-off-by: Nok Lam Chan <nok.lam.chan@quantumblack.com>
Signed-off-by: Nok Lam Chan <nok.lam.chan@quantumblack.com>
I get this error when the dictionary return a
As a result it shows:
I don't find this particular valuable, but this seems to be the only way to please |
Signed-off-by: Nok Lam Chan <nok.lam.chan@quantumblack.com>
Signed-off-by: Nok Lam Chan <nok.lam.chan@quantumblack.com>
Signed-off-by: Nok Lam Chan <nok.lam.chan@quantumblack.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving with a question, the rest LGTM!
Signed-off-by: Nok Lam Chan <nok.lam.chan@quantumblack.com>
Description
Fix #3618, since we are trying to improve the interactive experience. While it's still a bit unclear as
AbstractConfigLoader
inherit fromUserDict
,OmegaConfigLoader
only presents traits for dictionary access pattern, i.e. dict["key"], but not the other API such as iterating the keys.Development notes
The PR is not a perfect fix, but nonetheless address two issues:
__repr__
is misleading as it is missing some arguments to start with, to do this I also have to saveself._custom_resolver
)keys
is implemented so that at least it is iterable, we can consider__iter__
andvalues
as well but I want to keep this PR minimal.Before change
After change
Developer Certificate of Origin
We need all contributions to comply with the Developer Certificate of Origin (DCO). All commits must be signed off by including a
Signed-off-by
line in the commit message. See our wiki for guidance.If your PR is blocked due to unsigned commits, then you must follow the instructions under "Rebase the branch" on the GitHub Checks page for your PR. This will retroactively add the sign-off to all unsigned commits and allow the DCO check to pass.
Checklist
RELEASE.md
file