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

Improvements and changes to progress tracking dataclasses #8140

Merged
merged 4 commits into from Jun 29, 2021

Conversation

carmocca
Copy link
Member

@carmocca carmocca commented Jun 25, 2021

What does this PR do?

  • Move the batch attributes inside the epoch progress. This follows the structure in the loops where the batch loop is an attribute in the epoch loop. This makes it easier for users to compose custom progress dataclasses and connect them across loops.
  • Implement {,from_}state_dict for all dataclasses
  • Follows the structure in training loop refactor - move val loop  #8120

Necessary to unblock #7976

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)

PR review

  • 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

@carmocca carmocca added feature Is an improvement or enhancement refactor design Includes a design discussion labels Jun 25, 2021
@carmocca carmocca added this to the v1.4 milestone Jun 25, 2021
@carmocca carmocca requested a review from awaelchli as a code owner June 25, 2021 22:14
@carmocca carmocca self-assigned this Jun 25, 2021
@codecov
Copy link

codecov bot commented Jun 25, 2021

Codecov Report

Merging #8140 (0fd3b3c) into master (24db914) will decrease coverage by 0%.
The diff coverage is 90%.

@@           Coverage Diff           @@
##           master   #8140    +/-   ##
=======================================
- Coverage      93%     92%    -0%     
=======================================
  Files         211     212     +1     
  Lines       13448   13578   +130     
=======================================
+ Hits        12475   12552    +77     
- Misses        973    1026    +53     

CHANGELOG.md Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
pytorch_lightning/trainer/progress.py Outdated Show resolved Hide resolved
Copy link
Contributor

@tchaton tchaton left a comment

Choose a reason for hiding this comment

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

LGTM !

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.

lgtm

@carmocca carmocca added the ready PRs ready to be merged label Jun 29, 2021
@tchaton tchaton merged commit 571a810 into master Jun 29, 2021
@tchaton tchaton deleted the feat/progress-dataclasses-improvements branch June 29, 2021 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Includes a design discussion feature Is an improvement or enhancement ready PRs ready to be merged refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants