Skip to content

[ONNX] Update API to torch.onnx.export(..., dynamo=True) #3223

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

Merged
merged 33 commits into from
Mar 5, 2025

Conversation

titaiwangms
Copy link
Contributor

@titaiwangms titaiwangms commented Jan 8, 2025

Fixes #3200

Description

Checklist

  • The issue that is being fixed is referred in the description (see above "Fixes #ISSUE_NUMBER")
  • Only one issue is addressed in this pull request
  • Labels from the issue that this PR is fixing are added to this pull request
  • No unnecessary issues are included into this pull request.

TODO: The registry doc also needs an update.

cc @justinchuby

Copy link

pytorch-bot bot commented Jan 8, 2025

🔗 Helpful Links

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

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

✅ You can merge normally! (1 Unrelated Failure)

As of commit bfad889 with merge base 469d95b (image):

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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

@titaiwangms titaiwangms marked this pull request as ready for review January 24, 2025 22:01
@titaiwangms
Copy link
Contributor Author

@svekars PTAL

@justinchuby
Copy link
Contributor

I don’t see print outputs here either https://pytorch.org/tutorials/beginner/onnx/intro_onnx.html. Do we need to do something to enable it? (If there is an option)

@justinchuby
Copy link
Contributor

@titaiwangms
Copy link
Contributor Author

They have prints here https://pytorch.org/tutorials/intermediate/torchrec_intro_tutorial.html

Yeah, I don't know. I tried a local build, and registry has the print out while control flow does not.
Screenshot 2025-01-24 185152
Screenshot 2025-01-24 185218

@titaiwangms
Copy link
Contributor Author

@svekars Should we skip link checker on this PR, since it's newly added page? Or is there anything I missed to enable the link?

@justinchuby
Copy link
Contributor

@svekars bump

@svekars svekars added the skip-link-check Will allow you to skip linkcheck on a PR. Should only should be used when a link can't be fixed. label Feb 3, 2025
@svekars
Copy link
Contributor

svekars commented Feb 3, 2025

skip-linkcheck because the failing link will become live after PR is merged.

@titaiwangms
Copy link
Contributor Author

@svekars Sorry, could you approve the workflows again? I missed the misspelled words. Could you also point me to the local repro of misspelled word checks? Thank you!

@titaiwangms
Copy link
Contributor Author

titaiwangms commented Feb 19, 2025

TODO: Update registry tutorial with triton support: pytorch/pytorch#147374

@titaiwangms
Copy link
Contributor Author

@svekars Sorry, could you approve the workflows again? I missed the misspelled words. Could you also point me to the local repro of misspelled word checks? Thank you!

@svekars PTAL

@@ -0,0 +1,185 @@
# -*- coding: utf-8 -*-
Copy link
Contributor

Choose a reason for hiding this comment

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

do you want to add a customcard for this tutorial in index.rst (like this) so it's discoverable on the landing page under the ONNX selector

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe you can you submit a follow up for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice suggestion!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will do it as a follow up.

@titaiwangms
Copy link
Contributor Author

@svekars Thanks for helping me on this PR!

I set up the exact same bash script test for pyspelling locally, and it gave me the same error as the one on CI when I run it on main branch with ONNX pages. Do you recommend us just remove toctree? Is there another preferrable way to keep the functionality of showing related pages to user in the bottom of the current tutorial page? Thanks!

@svekars
Copy link
Contributor

svekars commented Mar 5, 2025

@svekars Thanks for helping me on this PR!

I set up the exact same bash script test for pyspelling locally, and it gave me the same error as the one on CI when I run it on main branch with ONNX pages. Do you recommend us just remove toctree? Is there another preferrable way to keep the functionality of showing related pages to user in the bottom of the current tutorial page? Thanks!

Can you point me to the error? Spellcheck can be ignored for now.

@titaiwangms
Copy link
Contributor Author

It's under pyspelling CI test.

Checking spelling in beginner_source/onnx/export_control_flow_model_to_onnx_tutorial.py
Spelling errors found in beginner_source/onnx/export_control_flow_model_to_onnx_tutorial.py:
Misspelled words:
<url-free> beginner_source/onnx/export_control_flow_model_to_onnx_tutorial.py(161): html>body>p
--------------------------------------------------------------------------------
onnx
toc
txt
--------------------------------------------------------------------------------

Misspelled words:
<url-free> beginner_source/onnx/export_control_flow_model_to_onnx_tutorial.py(161): html>body>p
--------------------------------------------------------------------------------
toctree
--------------------------------------------------------------------------------

!!!Spelling check failed!!!
Checking spelling in beginner_source/onnx/export_simple_model_to_onnx_tutorial.py
Spelling errors found in beginner_source/onnx/export_simple_model_to_onnx_tutorial.py:
Misspelled words:
<url-free> beginner_source/onnx/export_simple_model_to_onnx_tutorial.py(202): html>body>p
--------------------------------------------------------------------------------
onnx
toc
txt
--------------------------------------------------------------------------------

Misspelled words:
<url-free> beginner_source/onnx/export_simple_model_to_onnx_tutorial.py(202): html>body>p
--------------------------------------------------------------------------------
toctree
--------------------------------------------------------------------------------

!!!Spelling check failed!!!
Checking spelling in beginner_source/onnx/intro_onnx.py
Spelling errors found in beginner_source/onnx/intro_onnx.py:
Misspelled words:
<url-free> beginner_source/onnx/intro_onnx.py(1): : html>body>p
--------------------------------------------------------------------------------
onnx
toc
txt
--------------------------------------------------------------------------------

Misspelled words:
<url-free> beginner_source/onnx/intro_onnx.py(1): : html>body>p
--------------------------------------------------------------------------------
toctree
--------------------------------------------------------------------------------

!!!Spelling check failed!!!
Checking spelling in beginner_source/onnx/onnx_registry_tutorial.py
Spelling errors found in beginner_source/onnx/onnx_registry_tutorial.py:
Misspelled words:
<url-free> beginner_source/onnx/onnx_registry_tutorial.py(247): html>body>p
--------------------------------------------------------------------------------
onnx
toc
txt
--------------------------------------------------------------------------------

Misspelled words:
<url-free> beginner_source/onnx/onnx_registry_tutorial.py(247): html>body>p
--------------------------------------------------------------------------------
toctree
--------------------------------------------------------------------------------

@svekars
Copy link
Contributor

svekars commented Mar 5, 2025

Can ignore spellcheck for now.

@svekars svekars merged commit cb2e4ed into pytorch:main Mar 5, 2025
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed skip-link-check Will allow you to skip linkcheck on a PR. Should only should be used when a link can't be fixed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ONNX] Add torch.onnx.export(..., dynamo=True) tutorials
8 participants