-
Notifications
You must be signed in to change notification settings - Fork 677
Move schedulers to training from modules. #1801
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🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/torchtune/1801
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit a3e2ffe with merge base 5de5001 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@joecummings Require review |
|
Should include backward capability, no merge right now! |
|
@ebsmothers Fixed backward capability |
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.
docs/source/api_ref_training.rst
Outdated
| create_optim_in_bwd_wrapper | ||
| register_optim_in_bwd_hooks | ||
|
|
||
| .. _metric_logging_label: |
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.
Probably need to update this (otherwise it's duplicated below)
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.
@krammnic in response to your question
| .. _metric_logging_label: | |
| .. _lr_scheduler_label: |
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.
Oh actually I think the new version under torchtune/training/lr_schedulers.py is missing from the PR.
Also separately if you are running into issues with your local pre-commit not lining up with the CI in lint job, you can mimic these steps in our CI job more directly on your local machine to try to get the same setup (though I'd think that the usual flow in our CONTRIBUTING.md around pre-commit install should be sufficient)
|
Yeah, will do some fix soon. I have broken something with my commits |
Fixed. Yeah, probably I will mimic CI using instructions that you provided, because the way that is provided in CONTRIBUTING.md is pretty inconvenient for me. |
Sounds good. By the way if CONTRIBUTING.md is not currently clear or giving the right setup you need, we should update it. We set it up a while back and many devs don't use it much day-to-day. But as someone onboarding to the project recently if there are certain areas where you're feeling friction let us know and we can hopefully make the process smoother. |
|
@ebsmothers Which label to put for schedulers section in docs? Will fix lint now and probably except this point it will be ready to merge. |
Updated my inline comment here with the suggestion |
|
Tag is fixed. |
|
Yeah, docs is built. Now let me fix lint and it will be ready to merge |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1801 +/- ##
==========================================
+ Coverage 67.05% 69.01% +1.95%
==========================================
Files 305 306 +1
Lines 15937 16024 +87
==========================================
+ Hits 10687 11059 +372
+ Misses 5250 4965 -285 ☔ View full report in Codecov by Sentry. |
|
Last lint fix. Should be fine right now |
docs/source/api_ref_training.rst
Outdated
|
|
||
| get_cosine_schedule_with_warmup | ||
|
|
||
| .. lr_scheduler_label: |
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.
this should swap with metric_logging_label above, and should have an underscore before: .. _lr_scheduler_label:. otherwise it gets interpreted as a comment (sphinx, I know)
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.
Fixed
docs/source/api_ref_training.rst
Outdated
| .. _metric_logging_label: | ||
|
|
||
| Schedulers | ||
| ----------------- |
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.
the underline needs to match the length of the "Schedulers" title
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.
Fixed
|
Finnaly! Can be merged... |
|
@RdoubleA As you already reviewed this maybe we can merge? |
docs/source/api_ref_training.rst
Outdated
|
|
||
| get_cosine_schedule_with_warmup | ||
|
|
||
| .. _lr_scheduler_label: |
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.
Is this right? Seems to me like lr scheduler label and metric logging label need to be swapped
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.
Are you speaking about 2 sections?(swap them) I'm not sure why you might want to swap specific labels
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.
Currently the _lr_scheduler_label is just above the "Metric Logging" section, while the _metric_logging_label is just above the "Schedulers" section. I believe it should be the other way around. (I don't care too much whether we swap labels or section orders, but one of them needs to be swapped. Otherwise labels are pointing to the wrong sections, no?)
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.
I seen now what was your idea, fixed!
|
@RdoubleA and/or @ebsmothers can one of you sign off on this? |
@joecummings I have one more comment on the file api_ref_training.rst. After that I am good to merge this |
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 making this change! Once CI is green I think we're good to merge here
Context
What is the purpose of this PR? Is it to
Please link to any issues this PR addresses.
Changelog
What are the changes made in this PR?
#1587
Test plan
Please make sure to do each of the following if applicable to your PR. If you're unsure about any one of these just ask and we will happily help. We also have a contributing page for some guidance on contributing.
pre-commit install)pytest testspytest tests -m integration_testUX
If your function changed a public API, please add a dummy example of what the user experience will look like when calling it.
Here is a docstring example
and a tutorial example