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

Trainer now calls on_load_checkpoint() when resuming from a checkpoint #1666

Merged
merged 1 commit into from
Apr 30, 2020
Merged

Conversation

yukw777
Copy link
Contributor

@yukw777 yukw777 commented Apr 29, 2020

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 to update the docs?
  • Did you write any new necessary tests?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

What does this PR do?

Fixes #1190.

I don't like that the trainer takes a path to load from checkpoint that is different from LightningModule's load_from_checkpoint() method, but i thought this was the simplest way to fix it since I didn't want to get into the nitty gritty of the trainer logic. I'm sure there's a reason why it does things differently rather than using LightningModule's method.

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 April 29, 2020 17:45
@yukw777 yukw777 changed the title Bugfix/1190 Trainer now calls on_load_checkpoint() when resuming from a checkpoint Apr 29, 2020
@codecov
Copy link

codecov bot commented Apr 29, 2020

Codecov Report

Merging #1666 into master will increase coverage by 0%.
The diff coverage is 100%.

@@          Coverage Diff           @@
##           master   #1666   +/-   ##
======================================
  Coverage      88%     88%           
======================================
  Files          71      71           
  Lines        4175    4176    +1     
======================================
+ Hits         3692    3693    +1     
  Misses        483     483           

@williamFalcon williamFalcon merged commit 8d564b5 into Lightning-AI:master Apr 30, 2020
@Borda Borda added the feature Is an improvement or enhancement label Apr 30, 2020
@Borda Borda added this to the 0.7.6 milestone Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Is an improvement or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Call load_from_checkpoint when trainer load state
3 participants