-
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
Adding support for the CosineAnnealingWarmRestarts scheduler #2851
Conversation
Hello @Alicegaz! Thanks for updating this PR.
Comment last updated at 2020-08-10 11:40:06 UTC |
Codecov Report
@@ Coverage Diff @@
## master #2851 +/- ##
========================================
- Coverage 90% 36% -55%
========================================
Files 78 78
Lines 7004 6927 -77
========================================
- Hits 6321 2466 -3855
- Misses 683 4461 +3778 |
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.
A few comment, PR is looking good.
Please also solve the pep issues.
@ananyahjha93 You might want to take a look at this since you recently added a scheduler to bolts. |
This pull request is now in conflict... :( |
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.
@ananyahjha93 what's the decision here? |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you need further help see our docs: https://pytorch-lightning.readthedocs.io/en/latest/CONTRIBUTING.html#pull-request or ask the assistance of a core contributor here or on Slack. Thank you for your contributions. |
This pull request is going to be closed. Please feel free to reopen it create a new from the actual master. |
Fixes #2849
Seems like there is currently no support for the schedulers taking values to the step function.
This commit adds support for any scheduler (not particularly
ReduceOnPlateau scheduler
) taking in validation metrics value/epoch/step_progress.Step progress is a float value that
CosineAnnealingWarmRestarts scheduler
takes in cases when a step function is called after each step, which is found ascurrent_epoch+batch_idx/num_training_batches
.Now, the
'monitor'
attribute in the schedulers dictionary can also take strings'epoch'
and'iter_frac'
(denotes step progress). As there will be the need for other input values, the dictionary of additional'monitor'
keys and short lambda functions implementing their computation can be extended or moved to the utils section.