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

Bugfix/lr finder #1676

Merged
merged 7 commits into from May 4, 2020
Merged

Conversation

SkafteNicki
Copy link
Member

@SkafteNicki SkafteNicki commented Apr 30, 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 #1648 where the learning rate finder could not be used by users that prefer to pass val_dataloaders directly to the different methods.

Fixed #1650 where the learning rate finder could not be used, when a EarlyStopping callback is passed to trainer.

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 30, 2020 14:21
@Borda Borda added the bug Something isn't working label Apr 30, 2020
@Borda Borda added this to the 0.7.6 milestone Apr 30, 2020
@mergify mergify bot requested a review from a team April 30, 2020 16:18
@Borda Borda added the ready PRs ready to be merged label Apr 30, 2020
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.

Looks ok :)
What I forgot to ask in the original PR for the LR finder: Isn't the dumping and restoring of Trainer args a bit fragile? If we introduce new Trainer args that interfere with the LRFinder, we always have to remember adding them here for dumping and restoring? Otherwise it will introduce a bug. Or do I misunderstand the purpose?

@SkafteNicki
Copy link
Member Author

The idea behind dumping and restoring trainer args is to take advantage of fit during the learning rate search (alternative would be to write a new training loop). I agree that this is a fragile feature, however for me the clear advantages of calling fit internally outweigh these disadvantages

@mergify
Copy link
Contributor

mergify bot commented May 1, 2020

This pull request is now in conflict... :(

@awaelchli
Copy link
Member

@SkafteNicki it makes sense to use fit, that's very good :) we just have to keep it in mind when we add new trainer args :) 馃憤

@codecov
Copy link

codecov bot commented May 1, 2020

Codecov Report

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

@@          Coverage Diff           @@
##           master   #1676   +/-   ##
======================================
  Coverage      88%     88%           
======================================
  Files          69      69           
  Lines        4131    4135    +4     
======================================
+ Hits         3655    3659    +4     
  Misses        476     476           

CHANGELOG.md Outdated Show resolved Hide resolved
@mergify mergify bot requested a review from a team May 1, 2020 20:31
@mergify mergify bot requested a review from a team May 1, 2020 20:32
@mergify
Copy link
Contributor

mergify bot commented May 2, 2020

This pull request is now in conflict... :(

@williamFalcon williamFalcon merged commit e865b04 into Lightning-AI:master May 4, 2020
@SkafteNicki SkafteNicki deleted the bugfix/lr_finder branch May 25, 2020 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

KeyError: 'early_stop_callback_wait' when calling training with auto_lr_find no val_dataloader when lr_find
4 participants