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

update hparams, allow OmegaConf #2047

Merged
merged 51 commits into from
Jun 8, 2020
Merged

update hparams, allow OmegaConf #2047

merged 51 commits into from
Jun 8, 2020

Conversation

Borda
Copy link
Member

@Borda Borda commented Jun 1, 2020

What does this PR do?

Fixes #2027
Fixes #2040
Fixes #2087

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@Borda Borda added bug Something isn't working feature Is an improvement or enhancement labels Jun 1, 2020
@Borda Borda added this to the 0.8.0 milestone Jun 1, 2020
@mergify mergify bot requested a review from a team June 1, 2020 23:04
tests/models/test_hparams.py Outdated Show resolved Hide resolved
tests/models/test_hparams.py Outdated Show resolved Hide resolved
@omry
Copy link
Contributor

omry commented Jun 3, 2020

Please check out the OmegaConf slides or docs.

@pep8speaks
Copy link

pep8speaks commented Jun 4, 2020

Hello @Borda! Thanks for updating this PR.

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-06-07 20:56:24 UTC

@Borda Borda changed the title DictConf update hparams, allow OmegaConf Jun 4, 2020
Copy link
Contributor

@omry omry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit comment.

tests/models/test_hparams.py Outdated Show resolved Hide resolved
@Borda
Copy link
Member Author

Borda commented Jun 4, 2020

it seems that the loading is a bit tricky as we need to separate from saving a single config and multiple primitives... in particular, the multiple primitives are aggregated to an internal dict which may be the same as passed single dict config... so these two use-cases need to be saved separately 🐰

@Borda
Copy link
Member Author

Borda commented Jun 7, 2020

dropped duplicated tests and removed test from a past feature about collecting init args

@Borda
Copy link
Member Author

Borda commented Jun 7, 2020

@omry @awaelchli @williamFalcon mind check the last version...

tests/loggers/test_trains.py Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
docs/source/hyperparameters.rst Show resolved Hide resolved
docs/source/hyperparameters.rst Outdated Show resolved Hide resolved
docs/source/hyperparameters.rst Outdated Show resolved Hide resolved
pytorch_lightning/core/lightning.py Outdated Show resolved Hide resolved
pytorch_lightning/core/lightning.py Outdated Show resolved Hide resolved
pytorch_lightning/trainer/training_io.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jun 7, 2020

Codecov Report

Merging #2047 into master will decrease coverage by 0%.
The diff coverage is 80%.

@@          Coverage Diff           @@
##           master   #2047   +/-   ##
======================================
- Coverage      86%     86%   -0%     
======================================
  Files          75      75           
  Lines        4710    4786   +76     
======================================
+ Hits         4067    4129   +62     
- Misses        643     657   +14     

@Borda Borda requested a review from williamFalcon June 7, 2020 20:02
Co-authored-by: Omry Yadan <omry@fb.com>
@Borda Borda changed the title [wip] update hparams, allow OmegaConf update hparams, allow OmegaConf Jun 7, 2020
@williamFalcon williamFalcon merged commit d2967d9 into master Jun 8, 2020
@Borda Borda deleted the omegaconf branch June 8, 2020 12:18
justusschock pushed a commit that referenced this pull request Jun 29, 2020
* DictConf

* inits

* Apply suggestions from code review

Co-authored-by: Omry Yadan <omry@fb.com>

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* atrib

* wip

* wip

* wip

* added hparams test

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Update test_hparams.py

* added hparams test

* added hparams test

* pep8

* pep8

* pep8

* docs

* wip

* wip

* clean

* review @omry

* Update docs/source/hyperparameters.rst

Co-authored-by: Omry Yadan <omry@fb.com>

Co-authored-by: Omry Yadan <omry@fb.com>
Co-authored-by: William Falcon <waf2107@columbia.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feature Is an improvement or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] remove frame introspection Support omegaconf in hparams Support DictConfig
4 participants