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

[Feat] Add utilities for CombinedLoader state dict and dataloader state dict 1/n #8364

Merged
merged 50 commits into from
Jul 19, 2021

Conversation

tchaton
Copy link
Contributor

@tchaton tchaton commented Jul 10, 2021

What does this PR do?

This PR adds the functionalities to enable state dict generation and reload for dataloaders.

Does your PR introduce any breaking changes ? If yes, please list them.

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)
  • Did you list all the breaking changes introduced by this pull request?

PR review

Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?

Make sure you had fun coding 🙃

@tchaton tchaton added the design Includes a design discussion label Jul 10, 2021
@tchaton tchaton added this to the v1.4 milestone Jul 10, 2021
@tchaton tchaton self-assigned this Jul 10, 2021
@codecov
Copy link

codecov bot commented Jul 10, 2021

Codecov Report

Merging #8364 (12bfa57) into master (7bb810f) will increase coverage by 0%.
The diff coverage is 95%.

@@           Coverage Diff           @@
##           master   #8364    +/-   ##
=======================================
  Coverage      92%     92%            
=======================================
  Files         217     217            
  Lines       14094   14223   +129     
=======================================
+ Hits        13001   13128   +127     
- Misses       1093    1095     +2     

@tchaton tchaton changed the title [Feat] Add utilities for CombinedLoader state dict and dataloader state dict [Feat] Add utilities for CombinedLoader state dict and dataloader state dict 1/n Jul 10, 2021
pytorch_lightning/trainer/supporters.py Outdated Show resolved Hide resolved
pytorch_lightning/trainer/supporters.py Outdated Show resolved Hide resolved
Copy link
Member

@justusschock justusschock left a comment

Choose a reason for hiding this comment

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

docstring line removals need to be reverted for sphinx passing

pytorch_lightning/trainer/supporters.py Outdated Show resolved Hide resolved
@pep8speaks
Copy link

pep8speaks commented Jul 12, 2021

Hello @tchaton! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

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

Comment last updated at 2021-07-19 09:23:17 UTC

pytorch_lightning/trainer/supporters.py Outdated Show resolved Hide resolved
pytorch_lightning/trainer/supporters.py Outdated Show resolved Hide resolved
pytorch_lightning/utilities/auto_restart.py Outdated Show resolved Hide resolved
@awaelchli awaelchli enabled auto-merge (squash) July 12, 2021 21:55
Borda and others added 4 commits July 13, 2021 00:42
Co-authored-by: Sean Naren <[email protected]>
why does this fix the tests???
Copy link
Member

@ethanwharris ethanwharris left a comment

Choose a reason for hiding this comment

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

LGTM, minor comments

pytorch_lightning/trainer/supporters.py Outdated Show resolved Hide resolved
pytorch_lightning/utilities/auto_restart.py Outdated Show resolved Hide resolved
pytorch_lightning/utilities/auto_restart.py Outdated Show resolved Hide resolved
@Borda Borda requested review from SeanNaren and carmocca July 19, 2021 08:21
@mergify mergify bot removed the has conflicts label Jul 19, 2021
pytorch_lightning/trainer/supporters.py Outdated Show resolved Hide resolved
pytorch_lightning/utilities/auto_restart.py Outdated Show resolved Hide resolved
pytorch_lightning/utilities/auto_restart.py Show resolved Hide resolved
tests/utilities/test_auto_restart.py Outdated Show resolved Hide resolved
tests/utilities/test_auto_restart.py Outdated Show resolved Hide resolved
tests/utilities/test_auto_restart.py Outdated Show resolved Hide resolved
tests/utilities/test_auto_restart.py Outdated Show resolved Hide resolved
tests/utilities/test_auto_restart.py Outdated Show resolved Hide resolved
tests/utilities/test_auto_restart.py Outdated Show resolved Hide resolved
tests/utilities/test_auto_restart.py Outdated Show resolved Hide resolved
@awaelchli awaelchli merged commit 374fae5 into master Jul 19, 2021
@awaelchli awaelchli deleted the dataloaders_restore branch July 19, 2021 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Includes a design discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants