-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Convert to markdown: fsdp.rst, func.api.rst, func.batch_norm.rst, func.migrating.rst, func.rst #155104
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
Convert to markdown: fsdp.rst, func.api.rst, func.batch_norm.rst, func.migrating.rst, func.rst #155104
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/155104
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 12a749d05f7f0a7c0385e8ce5324dcd6c6fd92db with merge base 0d8c029 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
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.
Looks like this PR only adds 5 new files. I think the intent of of this task to is rename the rst files to md so we'd need another commit to remove the 5 corresponding rst files.
Double check the issue for instructions on how to correctly convert the .rst to .md (step 2 in the issue gives you the correct way to do it). |
ae12b3b
to
fac0604
Compare
Sorry my bad. I made the changes |
This PR also address #155158 |
docs/source/func.api.md
Outdated
|
||
However, if you want to do something like compute a jacobian over the parameters | ||
of the model, then there needs to be a way to construct a function where the | ||
parameters are the inputs to the function. | ||
That's what :func:`functional_call` is for: | ||
That's what {func}`functional_call` is for: |
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.
below parameters
should have single backticks
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/func.migrating.md
Outdated
| functorch.vmap | `torch.vmap` or `torch.func.vmap` | | ||
| functorch.grad | `torch.func.grad` | |
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.
we should use {func}
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
We typically prefer each PR to address one issue but given what a small change this is, I guess it's okay. |
b7efc97
to
0d99d93
Compare
To add the ciflow label This helps ensure we don't trigger CI on this PR until it is actually authorized to do so. Please ping one of the reviewers if you do not have access to approve and run workflows. |
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.
Looks good - I've found a couple of minor formatting issues in func.migrating.md but otherwise this will be good to go.
docs/source/func.migrating.md
Outdated
return torch.func.functional_call(base_model, (params, buffers), (data,)) | ||
|
||
output = torch.vmap(call_single_model, (0, 0, None))(params, buffers, data) | ||
assert output.shape == (num_models, batch_size, out_features) |
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.
Need to add the closing markdown backticks.
docs/source/func.migrating.md
Outdated
|
||
For example, here is an example of how to ensemble over a very simple model:: | ||
|
||
import torch |
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.
please: indent to the left the whole block
The formatting is a bit different: https://docs-preview.pytorch.org/pytorch/pytorch/155104/func.migrating.html#functorch-combine-state-for-ensemble from the main: https://docs.pytorch.org/docs/main/func.migrating.html#functorch-combine-state-for-ensemble
Thanks for your help @svekars |
@pytorchbot rebase |
Docathon:
Fixes #155021
Fixes #155158
cc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @svekars @sekyondaMeta @AlannaBurke @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @jerryzh168 @gujinghui @PenghuiCheng @jianyuh @min-jean-cho @yanbing-j @Guobing-Chen @Xia-Weiwen @snadampal @voznesenskym @penguinwu @EikanWang @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov