-
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 stepping option #941
Learning rate stepping option #941
Conversation
@SkafteNicki awesome haha. Can you replace it with a dict instead of array? (#945) Fixes #945 |
@SkafteNicki mind rebase as well? :) |
@williamFalcon will do the rebase and change structure to a dict within the next day or so. You are right that for future features it is probably best to have it in a dict like structure. I propose to have three fields: |
cool. do we need frequency? |
This looks nice :) Personally I would opt for a batch / epoch option as suggested by @williamFalcon in #945 There may be some value to a frequency argument for iterable stuff (where there's no real notion of an epoch) - but perhaps the options could be 'epoch', 'batch', or int? It should also work smoothly with the accumulate grads stuff, i.e. 'batch' should really mean call to |
Yeah we just need "step". That's become the standard way to do it. If you
need "every x steps" that should be in the scheduler
El mar., 25 de febrero de 2020 15:54, Ethan Harris <[email protected]>
escribió:
… This looks nice :) Personally I would opt for a batch / epoch option as
suggested by @williamFalcon <https://github.com/williamFalcon> in #945
<#945>
There may be some value to a frequency argument for iterable stuff (where
there's no real notion of an epoch) - but perhaps the options could be
'epoch', 'batch', or int?
It should also work smoothly with the accumulate grads stuff, i.e. 'batch'
should really mean call to .step
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#941>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAIYKXE6NT6ZGS7YR5HUR3REWAQPANCNFSM4K3M2GYQ>
.
|
Hello @SkafteNicki! Thanks for updating this PR.
Comment last updated at 2020-03-05 08:42:37 UTC |
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.
it becomes quite long... what about LR move to separate mixin, also tests to test_trainer_lr
@SkafteNicki awesome! Let's rebase so we can get this merged :) |
@SkafteNicki fix tests? |
@williamFalcon the failing test seems to be unrelated to the PR, tests were passing before the latest merge |
Ok, so merging master has caused some issues here, the callback test in @SkafteNicki - the simplest thing to do would be to have a look at the diff and just remove the bits that weren't you - or revert the merge and do a rebase |
@SkafteNicki have some failing GPU tests.
|
@SkafteNicki any chance you can finish this in the next few hours so we can merge and release? |
@williamFalcon, sorry for the delay, been really busy the last couple of days. The failing checks all seems to be course by (nothing to do with this PR) |
Yeah, it is happening from yesterday... |
@Borda anything I can do? |
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.
can we make the monitoring "val_loss" as a parameter?
I guess it is fine (maybe check las Wills comment)... Great job again! |
@Borda I have changed code such that users can also pass a |
|
@williamFalcon fixed the failing test, so all checks are passing now |
* remove deprecated args to learning rate step function * step based scheduler * mixing models for testing * fix styling * tests * update documentation * smaller fix * update to dict structure * updated test * update documentation * update CHANGELOG.md * fix styling * fix problems with trainer io * fix tests * simplification of code * fix styling * change from batch to step * update to tests * fix styling * fixed some logic * Update pytorch_lightning/core/lightning.py * duplicated test * fix test on amp * small update to tests * added monitor key for ReduceLROnPlateau * Update trainer.py * Update training_loop.py * fix test after introducing monitor keyword Co-authored-by: Jirka Borovec <[email protected]> Co-authored-by: William Falcon <[email protected]>
Before submitting
What does this PR do?
Fixes #806
Fixes part of #827
Fixes #945
This PR will allow the user to choose the frequency at which the learning rate schedulers are called by supplying it as:
this will call
scheduler.step()
everyfreq
training step. The user can still just writewhich (like now) will call
scheduler.step()
after every epoch. This way the changes should be backward compatible. This may not be the most intuitive way to do it and I am happy to discuss another way of doing it.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.