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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call on_load_checkpoint before loading state_dict #4057

Merged
merged 1 commit into from Oct 14, 2020
Merged

Conversation

rohitgr7
Copy link
Contributor

What does this PR do?

Follow up #3996. This was missed in that PR.

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • 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? Otherwise, we ask you to create a separate PR for every change.
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

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 馃檭

@mergify mergify bot requested a review from a team October 10, 2020 16:25
Copy link
Member

@awaelchli awaelchli left a comment

Choose a reason for hiding this comment

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

I think it makes sense, and it can be useful when the hook can change state dict before the weights are loaded.

@mergify mergify bot requested a review from a team October 11, 2020 16:10
@rohitgr7
Copy link
Contributor Author

rohitgr7 commented Oct 11, 2020

  1. I am not familier with hpc_load/save. Should on_hpc_load be moved before load_state_dict too?
  2. Also there isn't any datamodule.on_hpc_load, just like we have datamodule.on_load_checkpoint

@mergify mergify bot requested a review from a team October 12, 2020 06:59
@codecov
Copy link

codecov bot commented Oct 14, 2020

Codecov Report

Merging #4057 into master will decrease coverage by 2%.
The diff coverage is 100%.

@@           Coverage Diff            @@
##           master   #4057     +/-   ##
========================================
- Coverage      92%     90%     -2%     
========================================
  Files         105     111      +6     
  Lines        7815    9900   +2085     
========================================
+ Hits         7194    8955   +1761     
- Misses        621     945    +324     

@mergify mergify bot requested a review from a team October 14, 2020 21:24
Copy link
Member

@Borda Borda left a comment

Choose a reason for hiding this comment

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

lgtm

@Borda Borda added the bug Something isn't working label Oct 14, 2020
@Borda Borda merged commit dec31b3 into master Oct 14, 2020
@Borda Borda deleted the bugfix/on_load_ckpt branch October 14, 2020 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants