Skip to content

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

Closed

Conversation

jafraustro
Copy link
Contributor

@jafraustro jafraustro commented Jun 4, 2025

Copy link

pytorch-bot bot commented Jun 4, 2025

🔗 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 Failures

As of commit 12a749d05f7f0a7c0385e8ce5324dcd6c6fd92db with merge base 0d8c029 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label Jun 4, 2025
@github-actions github-actions bot added docathon-h1-2025 medium Label for medium docathon tasks module: docs Related to our documentation, both in docs/ and docblocks triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels Jun 4, 2025
@jafraustro jafraustro marked this pull request as ready for review June 4, 2025 08:28
Copy link
Collaborator

@zxiiro zxiiro left a 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.

@sekyondaMeta
Copy link
Collaborator

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).

@jafraustro jafraustro force-pushed the jafraust/issue_155021 branch 2 times, most recently from ae12b3b to fac0604 Compare June 4, 2025 15:53
@jafraustro
Copy link
Contributor Author

Sorry my bad.

I made the changes

@jafraustro jafraustro requested a review from zxiiro June 4, 2025 16:00
zxiiro
zxiiro previously approved these changes Jun 4, 2025
@zxiiro zxiiro dismissed their stale review June 4, 2025 16:34

I'm not a reviewer for the docathon.

@pytorch-bot pytorch-bot bot added the oncall: distributed Add this issue/PR to distributed oncall triage queue label Jun 4, 2025
@jafraustro
Copy link
Contributor Author

This PR also address #155158


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:
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Comment on lines 26 to 27
| functorch.vmap | `torch.vmap` or `torch.func.vmap` |
| functorch.grad | `torch.func.grad` |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should use {func}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@svekars
Copy link
Contributor

svekars commented Jun 4, 2025

We typically prefer each PR to address one issue but given what a small change this is, I guess it's okay.

Copy link

pytorch-bot bot commented Jun 5, 2025

To add the ciflow label ciflow/inductor please first approve the workflows that are awaiting approval (scroll to the bottom of this page).

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.

Copy link
Contributor

@svekars svekars left a 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.

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)
Copy link
Contributor

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.


For example, here is an example of how to ensemble over a very simple model::

import torch
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jafraustro
Copy link
Contributor Author

Thanks for your help @svekars

@svekars
Copy link
Contributor

svekars commented Jun 6, 2025

@pytorchbot rebase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docathon-h1-2025 medium Label for medium docathon tasks module: cpu CPU specific problem (e.g., perf, algorithm) module: docs Related to our documentation, both in docs/ and docblocks module: dynamo module: inductor module: mkldnn Related to Intel IDEEP or oneDNN (a.k.a. mkldnn) integration oncall: distributed Add this issue/PR to distributed oncall triage queue open source release notes: distributed (checkpoint) release notes: inductor (aoti) topic: not user facing topic category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ERROR: Unknown target name: "deepspeed" Convert to markdown: fsdp.rst, func.api.rst, func.batch_norm.rst, func.migrating.rst, func.rst
8 participants