-
Notifications
You must be signed in to change notification settings - Fork 24.7k
To add Chained Scheduler to the list of PyTorch schedulers. #63491
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
Conversation
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit 8eaf9f9 (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions to the (internal) Dr. CI Users group. |
bd127e5
to
f5dae1b
Compare
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.
Thanks for the fast PR. I left a couple of comments, please let me know what you think.
f5dae1b
to
c3caf18
Compare
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, thanks for your PR @iramazanli.
I know that the name of the scheduler might change but other than that the code looks fine to me. Feel free to merge whenever you are happy.
c3caf18
to
8eaf9f9
Compare
@iramazanli has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
1 similar comment
@iramazanli has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Codecov Report
@@ Coverage Diff @@
## master #63491 +/- ##
==========================================
- Coverage 66.84% 66.77% -0.08%
==========================================
Files 695 695
Lines 90736 90768 +32
==========================================
- Hits 60656 60608 -48
- Misses 30080 30160 +80 |
@iramazanli merged this pull request in 5a12cb6. |
In this PR we are introducing ChainedScheduler which initially proposed in the discussion #26423 (comment) .
The idea is to provide a user friendly chaining method for schedulers, especially for the cases many of them are involved and we want to have a clean and easy to read interface for schedulers. This method will be even more crucial once CompositeSchedulers and Schedulers for different type of parameters are involved.
The immediate application of Chained Scheduler is expected to happen in TorchVision Library to combine WarmUpLR and MultiStepLR https://github.com/pytorch/vision/blob/master/references/video_classification/scheduler.py#L5 . However, it can be expected that in many other use cases also this method could be applied.
Example
The usage is as simple as below:
Then calling
would trigger step function for all three schedulers consecutively
Partially resolves pytorch/vision#4281