-
Notifications
You must be signed in to change notification settings - Fork 25.7k
[ONNX] Hide draft export under a flag #162225
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
Use `TORCH_ONNX_ENABLE_DRAFT_EXPORT` to control whether draft_export should be used as a strategy in onnx export. Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/162225
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 1 PendingAs of commit f422da9 with merge base 0d84ff3 ( 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.
Pull Request Overview
This PR introduces a feature flag TORCH_ONNX_ENABLE_DRAFT_EXPORT
to conditionally enable the TorchExportDraftExportStrategy
in ONNX export. The draft export functionality is now hidden behind this flag, preventing it from being used by default while still allowing opt-in access.
- Adds
ENABLE_DRAFT_EXPORT
boolean flag controlled by environment variable - Conditionally includes
TorchExportDraftExportStrategy
in capture strategies based on flag - Updates export status tracking to handle the draft export strategy
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
torch/onnx/_flags.py | Replaces placeholder flag with ENABLE_DRAFT_EXPORT flag (default: False) |
torch/onnx/_internal/exporter/_capture_strategies.py | Conditionally adds draft export strategy and fixes import path |
torch/onnx/_internal/exporter/_core.py | Adds status tracking for draft export strategy |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
@pytorchbot merge -f "trunk/win-vs2022 is taking too long and it's unrelated" |
The merge job was canceled or timed out. This most often happen if two merge requests were issued for the same PR, or if merge job was waiting for more than 6 hours for tests to finish. In later case, please do not hesitate to reissue the merge command |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Use `TORCH_ONNX_ENABLE_DRAFT_EXPORT` to control whether draft_export should be used as a strategy in onnx export. Follow up of pytorch#161454 Pull Request resolved: pytorch#162225 Approved by: https://github.com/xadupre, https://github.com/titaiwangms
Use `TORCH_ONNX_ENABLE_DRAFT_EXPORT` to control whether draft_export should be used as a strategy in onnx export. Follow up of pytorch#161454 Pull Request resolved: pytorch#162225 Approved by: https://github.com/xadupre, https://github.com/titaiwangms
Use `TORCH_ONNX_ENABLE_DRAFT_EXPORT` to control whether draft_export should be used as a strategy in onnx export. Follow up of pytorch#161454 Pull Request resolved: pytorch#162225 Approved by: https://github.com/xadupre, https://github.com/titaiwangms
Use `TORCH_ONNX_ENABLE_DRAFT_EXPORT` to control whether draft_export should be used as a strategy in onnx export. Follow up of pytorch#161454 Pull Request resolved: pytorch#162225 Approved by: https://github.com/xadupre, https://github.com/titaiwangms
Use `TORCH_ONNX_ENABLE_DRAFT_EXPORT` to control whether draft_export should be used as a strategy in onnx export. Follow up of pytorch#161454 Pull Request resolved: pytorch#162225 Approved by: https://github.com/xadupre, https://github.com/titaiwangms
Use
TORCH_ONNX_ENABLE_DRAFT_EXPORT
to control whether draft_export should be used as a strategy in onnx export.Follow up of #161454
cc @titaiwangms