Skip to content
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

[ONNX 1] Add Backend section to the left page of Tutorials layout page #2550

Merged
merged 2 commits into from
Oct 4, 2023

Conversation

thiagocrepaldi
Copy link
Contributor

@thiagocrepaldi thiagocrepaldi commented Sep 6, 2023

This PR adds a Backends section to the left menu which initially will have a placeholder for the series of ONNX export tutorials based on Torch Dynamo backend

A table of content tree page will have static URL https://pytorch.org/tutorials/beginner/onnx/intro_onnx.html that will be referenced on PyTorch user document for torch.onnx module

Following is a screenshot of the resulting page

Preview page: https://docs-preview.pytorch.org/pytorch/tutorials/2550/beginner/onnx/intro_onnx.html

Fixes: #2552

@pytorch-bot
Copy link

pytorch-bot bot commented Sep 6, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/2550

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit f90ef02 with merge base 587c62a (image):
💚 Looks good so far! There are no failures yet. 💚

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

@thiagocrepaldi thiagocrepaldi changed the title Create ONNX section with sattic URL Create ONNX section with static URL Sep 6, 2023
@thiagocrepaldi thiagocrepaldi force-pushed the thiagofc/create-onnx-section branch 2 times, most recently from bb362c2 to 58de789 Compare September 7, 2023 18:13
@thiagocrepaldi thiagocrepaldi changed the title Create ONNX section with static URL Add ONNX section with static URL Sep 7, 2023
@thiagocrepaldi thiagocrepaldi marked this pull request as ready for review September 7, 2023 18:16
@thiagocrepaldi
Copy link
Contributor Author

#2541 will be added to this page as soon as it can be merged

@thiagocrepaldi
Copy link
Contributor Author

@msaroufim FYI

@msaroufim msaroufim self-requested a review September 7, 2023 21:18
Copy link
Member

@msaroufim msaroufim left a comment

Choose a reason for hiding this comment

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

I'm generally OK with having a tutorials/onnx index page but having onnx be a in the left hand navigation is not something I'm as excited about since I'd then have to also be OK with other compiler vendors doing the same

Is there any way we can roll this content in to the deployment tab?

@thiagocrepaldi
Copy link
Contributor Author

I'm generally OK with having a tutorials/onnx index page but having onnx be a in the left hand navigation is not something I'm as excited about since I'd then have to also be OK with other compiler vendors doing the same

Is there any way we can roll this content in to the deployment tab?

If we could have submenus under Deploying PyTorch Models in Production menu, that probably would help already, but I think this is not a trivial task by quickly going through the code. That is why we proposed a ONNX menu on its own.

We do understand the duality of ONNX, especially after pytorch 2.x series. On one hand, torch.onnx is within pytorch project under the github.com/pytorch umbrella, like torchvision, torchtext, and torchaudio. Each of these other pytorch components have a menu on their own. From this point of view, ONNX module as pytorch's component could have a menu on its own. On the other hand, after pt 2.0 the concept of dynamo backends got generalized and vendors started implementing theirs and adding all of them might be tricky.

Also, because we introduced a new ONNX exporter based on Dynamo (torch.onnx.dynamo_export) but we still support the older one based on TorchScript (torch.onnx.export), we plan in having tutorials helping on the decision-making process of which one to use, which wouldn't be a "deployment" tutorial per se, but very related. Other related but not exactly deployment might be 1) migration process from the TorchScript to the Dynamo based exporter and 2) working around limitations of the exporter, helping users to fix their model for successful export. There is a whole bunch of ONNX-related tutorials to cover lack of documentation of the previous exporter that we plan that may not fit directly into the "deployment" umbrella and having them sprinkled in different menus would be a bit messy

I hope that helps making our case :)

@thiagocrepaldi thiagocrepaldi changed the title Add ONNX section with static URL Add Backend section to the left page of Tutorials layout page Sep 12, 2023
@thiagocrepaldi
Copy link
Contributor Author

Changed the left menu to Backends instead of ONNX as per offline discussion with @svekars

@msaroufim
Copy link
Member

Ping me when the doc renders I still don't see the most recent changes

@thiagocrepaldi
Copy link
Contributor Author

Ping me when the doc renders I still don't see the most recent changes

ping

@msaroufim
Copy link
Member

msaroufim commented Sep 13, 2023

ok just stamped thanks! @svekars what's the convention for merging things in tutorials I forget what the policy is, do you tag things as 2.1 and wait until core does that upgrade to merge?

@svekars
Copy link
Contributor

svekars commented Sep 13, 2023

Thanks! I will do an editorial pass. We will merge all 2.1 tutorials on the day of the release.

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.

LGTM, just a couple of nits.

beginner_source/onnx/intro_onnx.py Outdated Show resolved Hide resolved
beginner_source/onnx/intro_onnx.py Outdated Show resolved Hide resolved
beginner_source/onnx/intro_onnx.py Outdated Show resolved Hide resolved
@thiagocrepaldi
Copy link
Contributor Author

LGTM, just a couple of nits.

nits fixed

@thiagocrepaldi thiagocrepaldi changed the title Add Backend section to the left page of Tutorials layout page [ONNX 1] Add Backend section to the left page of Tutorials layout page Sep 13, 2023
@thiagocrepaldi thiagocrepaldi force-pushed the thiagofc/create-onnx-section branch 2 times, most recently from a7bc59b to 29d4650 Compare September 26, 2023 14:32
This PR adds a `Backends` section to the left menu which initially will
initially contain a placeholder for the series of ONNX export tutorials
based on Torch Dynamo backend

A table of content tree page will have static URL
https://pytorch.org/tutorials/beginner/onnx/intro_onnx.html that will be
referenced on PyTorch user document for torch.onnx module
@svekars svekars merged commit 260a0c5 into pytorch:main Oct 4, 2023
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create ONNX section on PyTorch Tutorials page as a placeholder for all ONNX export tutorials
4 participants