-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Learning rate log callback #1498
Learning rate log callback #1498
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- add test case
- changelog
This pull request is now in conflict... :( |
Codecov Report
@@ Coverage Diff @@
## master #1498 +/- ##
======================================
Coverage 89% 89%
======================================
Files 72 72
Lines 4229 4229
======================================
Hits 3744 3744
Misses 485 485 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it!
I have minor comments :)
Co-Authored-By: Adrian Wälchli <aedu.waelchli@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🤖
This pull request is now in conflict... :( |
Co-Authored-By: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-Authored-By: Adrian Wälchli <aedu.waelchli@gmail.com>
8e495ec
to
9554095
Compare
Thank you for this extremely useful callback, @SkafteNicki ! I've noticed that you are using names = ['a', 'b', 'c']
d1 = dict.fromkeys(names, [])
d2 = {k: [] for k in names}
d1['a'].append(1)
d1['c'].append(2)
d2['a'].append(1)
d2['c'].append(2)
print(f'd1 = {d1}')
print(f'd2 = {d2}') prints
Contents of |
@ivannz good catch, I was not aware that |
@SkafteNicki Thank you, done. As a sidenote: in my experiments I found it quite useful to disable the misconfiguration check, since it requires an inconvenient branching (to remove What was the rationale behind issuing an |
@ivannz not really any rational behind, I just assumed that everyone that used this has a scheduler in their model. However, I can clearly see that it is smarter to have a warning instead of an exception. Could you also add this to the PR? |
@SkafteNicki done. I am going to patch both in a single PR. |
how to access the LR logged by LearningRateLogger? i couldn't find an example from the docs. |
@yitang the learning rate(s) are stored in the the |
@SkafteNicki is this written in the docs? |
@williamFalcon No, as the (originally) intention of the |
Before submitting
What does this PR do?
Fixes #1205
Implement simple callback, that logs learning rates during training.
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 🙃