-
Notifications
You must be signed in to change notification settings - Fork 116
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
Enhancement: Compact key support #152
Comments
postponing for 2.1 |
I am using # Request a number of CPUs and GPUs
resources:
requests:
cpu: "16"
nvidia.com/gpu: 1
limits:
cpu: "16"
nvidia.com/gpu: 1 Those fields are decided at the level of the Kubernetes specification. Any thoughts about this? |
Thanks for reporting. I am planning to allow for some opt-out mechanisms before finalizing compact key support. At the very least, you will be able to escape the dot in your yaml file: resources:
requests:
cpu: "16"
nvidia\.com/gpu: 1
limits:
cpu: "16"
nvidia\.com/gpu: 1 Is this sufficient for your use case? You can check-out #155 and test this, it's already there. |
Thanks I'll have a look. |
Escaping won't do the job for Kubernetes specifications. If you turn this new behavior by default please:
Without this, we'll have to stick to 2.0. Also, it seems to be a pretty big breaking change, why not bump to 3.0 for this feature? |
Thanks for the feedback @hadim. At this point this is still planned but it is not decided by any means. |
Thanks @omry . If the pressure is reduced and is less important then can I suggest you add it and turned it OFF by default? Would that work with you? Then people could turn it ON whenever they need it. The first time I heard about this feature I found it super useful indeed but seeing the issue with the Kubernetes specification, I don't think I would like to have it ON by default anymore. And the reason goes beyond Kubernetes actually. I see Omegaconf as a super-powerful Python dict (so powerful that it should be in the std lib actually :-D) and this is the reason why I use it. So for what I am concerned about and the usage I have, Omageconf should not break Python dict compatibility. That being said I understand this is very opinionated and very specific to my needs so no hard feeling if you turn it ON by default. I'll found a workaround. |
I will not land this feature unless I feel comfortable with it by adding sufficient escape hatches that support all use cases. |
I am aborting this. reasoning in #332. |
Compact keys
This will probably come in OmegaConf 2.1 as 2.0 is closed to new features at this time.
Given:
Allow the same config to be represented by:
Compatibility considerations
This changes the semantic meaning of a key with a dot, from a
to:
People using
.
in their keys now should be aware of it and ideally stop doing it (in 1.4 or 2.0).OmegaConf 2.0 will add a deprecation warning that can be disabled by setting the environment variable
OC_DISABLE_DOT_ACCESS_WARNING
to the value "1".To address this, there will be multiple opt out mechanisms (fully specification tbd).
some ideas:
.
:foo\.bar
The text was updated successfully, but these errors were encountered: