This PR introduces the dotdict, a simple class that let the user access dict keys with the dot notation. This has been introduced to reduce the access time of the configs (omegaconf.DictConfig and similar) attributes. The main config, after reading it in the cli.py, will be transformed into a dotdict object . The class adds also the __setstate__ and __getstate__ so that the class is pickable (needed for torch.distributed, specially in the decoupled algorithms).
Type of Change
Please select the one relevant option below:
New feature (non-breaking change that adds functionality)
Checklist
Please confirm that the following tasks have been completed:
[x] I have tested my changes locally and they work as expected. (Please describe the tests you performed.)
[x] I have added unit tests for my changes, or updated existing tests if necessary.
[x] I have updated the documentation, if applicable.
[x] I have installed pre-commit and run locally for my code changes.
Thank you for your contribution! Once you have filled out this template, please ensure that you have assigned the appropriate reviewers and that all tests have passed.
Summary
This PR introduces the
dotdict
, a simple class that let the user access dict keys with the dot notation. This has been introduced to reduce the access time of the configs (omegaconf.DictConfig
and similar) attributes. The main config, after reading it in thecli.py
, will be transformed into adotdict
object . The class adds also the__setstate__
and__getstate__
so that the class is pickable (needed fortorch.distributed
, specially in the decoupled algorithms).Type of Change
Please select the one relevant option below:
Checklist
Please confirm that the following tasks have been completed:
Thank you for your contribution! Once you have filled out this template, please ensure that you have assigned the appropriate reviewers and that all tests have passed.