Skip to content
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

DictConfig: Support float and bool keys #483

Closed
Jasha10 opened this issue Jan 21, 2021 · 1 comment · Fixed by #484
Closed

DictConfig: Support float and bool keys #483

Jasha10 opened this issue Jan 21, 2021 · 1 comment · Fixed by #484
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@Jasha10
Copy link
Collaborator

Jasha10 commented Jan 21, 2021

Currently we have DictKeyType = Union[str, int, Enum], i.e. DictConfig supports keys of type str or int or Enum.

This feature request is for expansion of DictKeyType to include float and bool:
DictKeyType = Union[str, int, Enum, float, bool].

Additionally, given that null is a valid as a key in YAML, we could consider adding support for None as a DictConfig key, although I suspect that support for None may be more difficult than support for float/bool.

As a starting point for implementation, PR #454 implemented support for int key type in DictConfig.

@omry omry changed the title DictConfig: more key types DictConfig: Support float and bool keys Jan 21, 2021
@omry omry added enhancement New feature or request help wanted Extra attention is needed labels Jan 21, 2021
@omry
Copy link
Owner

omry commented Jan 21, 2021

Thanks for filing @Jasha10.
I will welcome a diff from you adding support for those two types as keys but currently there are higher priority things to work so this is not planned for the next release of OmegaConf (unless you or someone else sends a soid PR to add it).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants