-
Notifications
You must be signed in to change notification settings - Fork 25.7k
[ONNX] Create deprecation warning on dynamo_export #146425
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
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/146425
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 1 PendingAs of commit c2c2692 with merge base 23fffb5 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@atalman could you import this PR? Thanks! |
@atalman has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
hi @justinchuby reimported the PR internally will followup with internal team on relanding |
@atalman does it look good? Thanks |
I am going to remove the deprecation warnings and instead only annotate the methods for now so that we can land this PR. @atalman feel free to let me know when internal usages are updated |
@atalman could you re-import? |
@atalman has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@pytorchbot merge -i |
Merge startedYour change will be merged while ignoring the following 1 checks: trunk / linux-focal-rocm6.3-py3.10 / test (distributed, 1, 1, linux.rocm.gpu.4) Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
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 |
4bd5dbc
to
c2c2692
Compare
@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 |
I use torch.onnx.dynamo_export with FakeTensors, like this:
how can I use |
@pytorchmergebot revert -c ghfirst -m "Broke internal tests" |
@pytorchbot successfully started a revert job. Check the current status here. |
Reverting PR 146425 failedReason: Command
Details for Dev Infra teamRaised by workflow job |
This reverts commit 63c2909. Reverted #146639 on behalf of https://github.com/atalman due to Sorry Need to revert #146425 ([comment](#146639 (comment)))
Adjust and add deprecation messages to torch.onnx utilities and verification methods because they are only related to torch script and are obsolete. Removed unused `_exporter_states.py` and removed the internal deprecation module in favor of the typing_extensions deprecated decorator. Pull Request resolved: #146639 Approved by: https://github.com/titaiwangms
@pytorchmergebot revert -c ghfirst -m "Broke internal tests" |
@pytorchbot successfully started a revert job. Check the current status here. |
This reverts commit 41e6d18. Reverted #146425 on behalf of https://github.com/atalman due to Broke internal tests ([comment](#146425 (comment)))
@justinchuby your PR has been successfully reverted. |
There is no need. torch.export uses faketensors by default. You may also pass in fake tensors as example inputs |
Reland pytorch#146003 Deprecation of `torch.onnx.dynamo_export`: * [`torch/onnx/_internal/_exporter_legacy.py`]: Added deprecation warnings to the `OnnxRegistry`, `ExportOptions`, `ONNXRuntimeOptions`, and `dynamo_export` functions, indicating that `torch.onnx.dynamo_export` is deprecated since version 2.6.0 and should be replaced with `torch.onnx.export(..., dynamo=True)`. Pull Request resolved: pytorch#146425 Approved by: https://github.com/titaiwangms, https://github.com/atalman
Replaced by #146923 |
Reland two PRs - #146425 - #146639 Fixed by removing the deprecation warning on a base class `ExportOptions`. Pull Request resolved: #146923 Approved by: https://github.com/titaiwangms
Reland #146003
Deprecation of
torch.onnx.dynamo_export
:torch/onnx/_internal/_exporter_legacy.py
]: Added deprecation warnings to theOnnxRegistry
,ExportOptions
,ONNXRuntimeOptions
, anddynamo_export
functions, indicating thattorch.onnx.dynamo_export
is deprecated since version 2.6.0 and should be replaced withtorch.onnx.export(..., dynamo=True)
.