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] Named Parameter Groups in LearningRateMonitor #7987

Merged
merged 20 commits into from
Jun 17, 2021

Conversation

AffineParameter
Copy link
Contributor

@AffineParameter AffineParameter commented Jun 15, 2021

What does this PR do?

This PR allows the LearningRateMonitor callback to log the actual parameter group names, if they exist. It should fallback to prior behavior in the event that the parameter group names do not exist.

Fixes #7981

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

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 🙃

@pep8speaks
Copy link

pep8speaks commented Jun 15, 2021

Hello @AffineParameter! Thanks for updating this PR.

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

Comment last updated at 2021-06-16 18:39:55 UTC

@codecov
Copy link

codecov bot commented Jun 15, 2021

Codecov Report

Merging #7987 (9d1af7e) into master (f7459f5) will decrease coverage by 5%.
The diff coverage is 91%.

@@           Coverage Diff           @@
##           master   #7987    +/-   ##
=======================================
- Coverage      92%     87%    -5%     
=======================================
  Files         203     207     +4     
  Lines       13157   13389   +232     
=======================================
- Hits        12043   11617   -426     
- Misses       1114    1772   +658     

@AffineParameter AffineParameter marked this pull request as ready for review June 15, 2021 16:01
@AffineParameter AffineParameter changed the title Named Parameter Groups in LearningRateMonitor [feat] Named Parameter Groups in LearningRateMonitor Jun 15, 2021
@awaelchli awaelchli added the feature Is an improvement or enhancement label Jun 15, 2021
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 !

pytorch_lightning/callbacks/lr_monitor.py Outdated Show resolved Hide resolved
@tchaton tchaton added the ready PRs ready to be merged label Jun 16, 2021
@AffineParameter
Copy link
Contributor Author

Happy to update the CHANGELOG, provided I can get a milestone to target. This should tie a bow on things?

Thanks for the quick reviews!

@awaelchli awaelchli added this to the v1.4 milestone Jun 16, 2021
@awaelchli
Copy link
Contributor

awaelchli commented Jun 16, 2021

@AffineParameter (love the name btw) <3
This is a feature so it will go into 1.4. Could you add the changelog entry to the 1.4 section then in CHANGELOG.md? Then it is ready for merge :)

@AffineParameter
Copy link
Contributor Author

PR Digression:

The contribution process (docs, workflow, reviews, etc.) have been really easy to work with! I am sure getting to this point hasn't been easy, but the effort and intentionality really shows. 🎩 's to all those responsible! :)

@awaelchli awaelchli enabled auto-merge (squash) June 16, 2021 16:06
@kaushikb11 kaushikb11 disabled auto-merge June 16, 2021 16:25
@kaushikb11 kaushikb11 enabled auto-merge (squash) June 16, 2021 16:27
@carmocca carmocca disabled auto-merge June 16, 2021 16:37
pytorch_lightning/callbacks/lr_monitor.py Outdated Show resolved Hide resolved
pytorch_lightning/callbacks/lr_monitor.py Outdated Show resolved Hide resolved
tests/callbacks/test_lr_monitor.py Outdated Show resolved Hide resolved
tests/callbacks/test_lr_monitor.py Outdated Show resolved Hide resolved
pytorch_lightning/callbacks/lr_monitor.py Outdated Show resolved Hide resolved
pytorch_lightning/callbacks/lr_monitor.py Show resolved Hide resolved
pytorch_lightning/callbacks/lr_monitor.py Outdated Show resolved Hide resolved
pytorch_lightning/callbacks/lr_monitor.py Show resolved Hide resolved
@AffineParameter
Copy link
Contributor Author

AffineParameter commented Jun 16, 2021

This is the last time I draw more attention to my already approved PR's by complementing the maintainers... 🤣

But seriously, I'll respond when I get the chance, and thanks for the great comments & suggestions!

@tchaton tchaton enabled auto-merge (squash) June 16, 2021 18:19
@tchaton
Copy link
Contributor

tchaton commented Jun 16, 2021

PR Digression:

The contribution process (docs, workflow, reviews, etc.) have been really easy to work with! I am sure getting to this point hasn't been easy, but the effort and intentionality really shows. 🎩 's to all those responsible! :)

Hey @AffineParameter, we definitely appreciated your mindset and contribution !
We hope to see more contributions from you and hope to keep the contribution process at the same high standard.

Best,
T.C

auto-merge was automatically disabled June 16, 2021 18:39

Head branch was pushed to by a user without write access

@carmocca carmocca merged commit 906de2a into Lightning-AI:master Jun 17, 2021
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 ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Let the LearningRateMonitor log the actual parameter group names, if they exist
7 participants