-
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
Consider inheriting from collections.Mapping and Sequence #114
Comments
Landed with typing.MutableMapping and typing.MutableSequence which are just as good. |
Hi @omry, I was trying to use Other packages like attrdict and dotmap inherit from Have you considered inheriting from In [1]: import omegaconf
In [2]: import collections
In [3]: isinstance(omegaconf.OmegaConf.create({"x": 10}), collections.abc.Mapping)
Out[3]: False
In [4]: isinstance(omegaconf.OmegaConf.create({"x": 10}), collections.abc.MutableMapping)
Out[4]: False
In [5]: from attrdict import AttrDict
In [6]: isinstance(AttrDict(x), collections.abc.Mapping)
Out[6]: True
In [7]: isinstance(AttrDict(x), collections.abc.MutableMapping)
Out[7]: True
In [8]: from dotmap import DotMap
In [9]: isinstance(DotMap({"x": 10}), collections.abc.Mapping)
Out[9]: True
In [10]: isinstance(DotMap({"x": 10}), collections.abc.MutableMapping)
Out[10]: True
In [11]: AttrDict?
Init signature: AttrDict(*args, **kwargs)
Docstring: A dict that implements MutableAttr.
File: ~/anaconda3/envs/xxx/lib/python3.7/site-packages/attrdict/dictionary.py
Type: ABCMeta
Subclasses:
In [12]: DotMap?
Init signature: DotMap(*args, **kwargs)
Docstring: Dictionary that remembers insertion order
File: ~/anaconda3/envs/xxx/lib/python3.7/site-packages/dotmap/__init__.py
Type: ABCMeta
Subclasses:
In [13]: omegaconf.dictconfig.DictConfig?
Init signature: omegaconf.dictconfig.DictConfig(content, parent=None)
Docstring: <no docstring>
File: ~/anaconda3/envs/xxx/lib/python3.7/site-packages/omegaconf/dictconfig.py
Type: type
Subclasses: |
@poweic, did you test on 2.0? |
My bad 😅 Not sure why I got an older version of omegaconf (1.4.1) with freshly installed |
Hydra 0.11 is not compatible with OmegaConf 1.4. |
No description provided.
The text was updated successfully, but these errors were encountered: