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 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.
The text was updated successfully, but these errors were encountered:
omry
changed the title
DictConfig: more key types
DictConfig: Support float and bool keys
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).
Currently we have
DictKeyType = Union[str, int, Enum]
, i.e.DictConfig
supports keys of typestr
orint
orEnum
.This feature request is for expansion of
DictKeyType
to includefloat
andbool
:DictKeyType = Union[str, int, Enum, float, bool]
.Additionally, given that
null
is a valid as a key in YAML, we could consider adding support forNone
as aDictConfig
key, although I suspect that support forNone
may be more difficult than support forfloat
/bool
.As a starting point for implementation, PR #454 implemented support for
int
key type inDictConfig
.The text was updated successfully, but these errors were encountered: