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

Feature/dotdict #112

Merged
merged 9 commits into from
Oct 2, 2023
Merged

Feature/dotdict #112

merged 9 commits into from
Oct 2, 2023

Conversation

belerico
Copy link
Member

@belerico belerico commented Oct 2, 2023

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 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:

  • I have tested my changes locally and they work as expected. (Please describe the tests you performed.)
  • I have added unit tests for my changes, or updated existing tests if necessary.
  • I have updated the documentation, if applicable.
  • 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.

@belerico belerico merged commit 45ff558 into main Oct 2, 2023
1 check passed
@belerico belerico deleted the feature/dotdict branch October 2, 2023 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants