pytorch/test/onnx
Justin Chu e6c39d37e9 [ONNX] Create deprecation warning on dynamo_export (#146003)
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: https://github.com/pytorch/pytorch/pull/146003
Approved by: https://github.com/titaiwangms
2025-01-30 20:13:32 +00:00
..
assets
dynamo [ONNX] Set USE_EXPERIMENTAL_LOGIC to True (#137296) 2025-01-28 22:35:11 +00:00
expect
exporter [ONNX] Support subgraphs with 1+ outputs (#145860) 2025-01-29 04:13:23 +00:00
internal PEP585 update - test (#145176) 2025-01-22 04:48:28 +00:00
model_defs PEP585 update - test (#145176) 2025-01-22 04:48:28 +00:00
torch_export [BE][Easy] use pathlib.Path instead of dirname / ".." / pardir (#129374) 2024-12-29 17:23:13 +00:00
autograd_helper.py
error_reproduction.py Revert "Use absolute path path.resolve() -> path.absolute() (#129409)" 2025-01-04 14:17:20 +00:00
onnx_test_common.py PEP585 update - test (#145176) 2025-01-22 04:48:28 +00:00
pytorch_test_common.py
test_autograd_funs.py Fix unused Python variables in test/[e-z]* (#136964) 2024-12-18 23:02:30 +00:00
test_custom_ops.py Fix unused Python variables in test/[e-z]* (#136964) 2024-12-18 23:02:30 +00:00
test_fx_passes.py [ONNX] Set USE_EXPERIMENTAL_LOGIC to True (#137296) 2025-01-28 22:35:11 +00:00
test_fx_type_promotion.py
test_lazy_import.py
test_models.py
test_models_onnxruntime.py PEP585 update - test (#145176) 2025-01-22 04:48:28 +00:00
test_models_quantized_onnxruntime.py
test_onnx_opset.py
test_onnxscript_no_runtime.py PEP585 update - test (#145176) 2025-01-22 04:48:28 +00:00
test_onnxscript_runtime.py
test_op_consistency.py PEP585 update - test (#145176) 2025-01-22 04:48:28 +00:00
test_pytorch_jit_onnx.py
test_pytorch_onnx_no_runtime.py [ONNX] Create deprecation warning on dynamo_export (#146003) 2025-01-30 20:13:32 +00:00
test_pytorch_onnx_onnxruntime.py PEP585 update - test (#145176) 2025-01-22 04:48:28 +00:00
test_pytorch_onnx_onnxruntime_cuda.py
test_pytorch_onnx_shape_inference.py Fix unused Python variables in test/[e-z]* (#136964) 2024-12-18 23:02:30 +00:00
test_symbolic_helper.py
test_utility_funs.py Fix unused Python variables in test/[e-z]* (#136964) 2024-12-18 23:02:30 +00:00
test_verification.py
verify.py Fix unused Python variables in test/[e-z]* (#136964) 2024-12-18 23:02:30 +00:00