-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[ONNX] Create deprecation warning on dynamo_export #146003
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/146003
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (4 Unrelated Failures)As of commit 65d9b41 with merge base 32bb6f8 ( FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
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. |
|
@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 |
Merge failedReason: 1 mandatory check(s) failed. The first few are: Dig deeper by viewing the failures on hud |
|
@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 |
Merge failedReason: 1 jobs have failed, first few of them are: trunk / macos-py3-arm64 / test (default, 2, 3, macos-m1-stable) Details for Dev Infra teamRaised by workflow job |
|
@pytorchbot merge -i |
Merge startedYour change will be merged while ignoring the following 5 checks: pull / linux-focal-py3.13-clang10 / test (default, 2, 5, lf.linux.4xlarge), pull / linux-focal-py3.13-clang10 / test (crossref, 2, 2, lf.linux.2xlarge), pull / linux-jammy-py3.9-gcc11 / test (default, 2, 5, lf.linux.2xlarge), pull / linux-focal-py3.9-clang10 / test (default, 2, 5, lf.linux.4xlarge), trunk / macos-py3-arm64 / test (default, 2, 3, macos-m1-stable) 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 |
|
@pytorchbot merge |
…dels_e2e.py (#146095) With [the deprecation of torch.onnx.dynamo_export](#146003), this PR turns the torch.export related tests toward torch.onn.export(..., dynamo=True), and places it in test_small_models_e2e.py NOTE: test_exported_program_as_input_from_file and test_onnx_program_supports_retraced_graph are not kept, because they are more of testing whether exported program stays the same after save/load and retrace. However, in torch.onnx.export(..., dynamo=True), we focus more on the export of from nn.Module to ONNX proto. Pull Request resolved: #146095 Approved by: https://github.com/justinchuby
|
@pytorchmergebot revert -c nosignal -m "Broke internally" |
|
@pytorchbot successfully started a revert job. Check the current status here. |
This reverts commit e6c39d3. Reverted #146003 on behalf of https://github.com/atalman due to Broke internally ([comment](#146003 (comment)))
|
@justinchuby your PR has been successfully reverted. |
|
@atalman sorry what's broken? |
| dump_exported_program: bool = False, | ||
| artifacts_dir: str | os.PathLike = ".", | ||
| fallback: bool = False, | ||
| **_, |
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.
Is it this line?
|
@justinchuby deprecation error is causing unit tests to fail, as the pytorch code still has references to the old torch.onnx.dynamo_export: https://github.com/pytorch/pytorch/blob/main/benchmarks/dynamo/common.py#L2047 |
|
I see. Is this the only reference? If we remove this reference will it succeed? |
|
hi @justinchuby once #146325 lands please rebase this PR, we should rebase and reimport this PR internally so we can run tests |
ONNX exporter experiments in benchmark is obsolete and unmaintained. This PR removes it to unblock #146003 Pull Request resolved: #146325 Approved by: https://github.com/titaiwangms
Summary: ONNX exporter experiments in benchmark is obsolete and unmaintained. This PR removes it to unblock pytorch/pytorch#146003 X-link: pytorch/pytorch#146325 Approved by: https://github.com/titaiwangms Reviewed By: ZainRizvi Differential Revision: D69115633 fbshipit-source-id: 20f264458f38d1dafde100970f07b6622e5b3d6e
|
Replaced by #146425 |
Deprecation of `torch.onnx.dynamo_export`: * [`torch/onnx/_internal/_exporter_legacy.py`](diffhunk://#diff-4d1eb96fe68ea904dcd1f8211318b9ff882dbfe4c3cb725ffc164b6c5a58b74cR83-R86): 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)`. [[1]](diffhunk://#diff-4d1eb96fe68ea904dcd1f8211318b9ff882dbfe4c3cb725ffc164b6c5a58b74cR83-R86) [[2]](diffhunk://#diff-4d1eb96fe68ea904dcd1f8211318b9ff882dbfe4c3cb725ffc164b6c5a58b74cR231-R234) [[3]](diffhunk://#diff-4d1eb96fe68ea904dcd1f8211318b9ff882dbfe4c3cb725ffc164b6c5a58b74cR442-R445) [[4]](diffhunk://#diff-4d1eb96fe68ea904dcd1f8211318b9ff882dbfe4c3cb725ffc164b6c5a58b74cR700-R703) This PR also removed the `**_` kwarg on onnx.export such that users get an error when they supply an unexpected augument. Updated to emit deprecation warning because it is more appropriate: https://docs.python.org/3/library/exceptions.html#DeprecationWarning Pull Request resolved: pytorch#146003 Approved by: https://github.com/titaiwangms
…dels_e2e.py (pytorch#146095) With [the deprecation of torch.onnx.dynamo_export](pytorch#146003), this PR turns the torch.export related tests toward torch.onn.export(..., dynamo=True), and places it in test_small_models_e2e.py NOTE: test_exported_program_as_input_from_file and test_onnx_program_supports_retraced_graph are not kept, because they are more of testing whether exported program stays the same after save/load and retrace. However, in torch.onnx.export(..., dynamo=True), we focus more on the export of from nn.Module to ONNX proto. Pull Request resolved: pytorch#146095 Approved by: https://github.com/justinchuby
…46003)" This reverts commit e6c39d3. Reverted pytorch#146003 on behalf of https://github.com/atalman due to Broke internally ([comment](pytorch#146003 (comment)))
ONNX exporter experiments in benchmark is obsolete and unmaintained. This PR removes it to unblock pytorch#146003 Pull Request resolved: pytorch#146325 Approved by: https://github.com/titaiwangms
Reland #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: #146425 Approved by: https://github.com/titaiwangms, https://github.com/atalman
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
Deprecation of
torch.onnx.dynamo_export:torch/onnx/_internal/_exporter_legacy.py: Added deprecation warnings to theOnnxRegistry,ExportOptions,ONNXRuntimeOptions, anddynamo_exportfunctions, indicating thattorch.onnx.dynamo_exportis deprecated since version 2.6.0 and should be replaced withtorch.onnx.export(..., dynamo=True). [1] [2] [3] [4]This PR also removed the
**_kwarg on onnx.export such that users get an error when they supply an unexpected augument.Updated to emit deprecation warning because it is more appropriate: https://docs.python.org/3/library/exceptions.html#DeprecationWarning