pytorch/test/onnx
Justin Chu e880cb2fe0 [ONNX] Remove beartype usage (#130484)
beartype has served us well in identifying type errors and ensuring we call internal functions with the correct arguments (thanks!). However, the value of having beartype is diminished because of the following:

1. When beartype improves support for better Dict[] type checking, it discovered typing mistakes in some functions that were previously uncaught. This caused the exporter to fail with newer versions beartype when it used to succeed. Since we cannot fix PyTorch and release a new version just because of this, it creates confusion for users that have beartype in their environment from using torch.onnx
2. beartype adds an additional call line in the traceback, which makes the already thick dynamo stack even larger, affecting readability when users diagnose errors with the traceback.
3. Since the typing annotations need to be evaluated, we cannot use new syntaxes like `|` because we need to maintain compatibility with Python 3.8. We don't want to wait for PyTorch take py310 as the lowest supported Python before using the new typing syntaxes.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/130484
Approved by: https://github.com/titaiwangms
2024-07-18 22:07:40 +00:00
..
assets
dynamo [ONNX] Remove beartype usage (#130484) 2024-07-18 22:07:40 +00:00
expect [ONNX] Adds Support for Some Bitwise Ops in Onnx Exporter (#126229) 2024-05-22 07:47:43 +00:00
internal [ONNX] Remove beartype usage (#130484) 2024-07-18 22:07:40 +00:00
model_defs [Ez][BE]: Enable new stable ruff rules (#129825) 2024-07-02 14:47:10 +00:00
torch_export [export][reland] Disable exported_program.__call__ (#120019) 2024-03-05 05:29:46 +00:00
autograd_helper.py
error_reproduction.py [5/N][Easy] fix typo for usort config in pyproject.toml (kown -> known): sort torch (#127126) 2024-05-27 14:49:57 +00:00
onnx_test_common.py [ONNX] Remove beartype usage (#130484) 2024-07-18 22:07:40 +00:00
pytorch_test_common.py [Caffe2] [2/N] Remove Caffe2 from tests (#128911) 2024-06-19 00:05:50 +00:00
test_autograd_funs.py [5/N][Easy] fix typo for usort config in pyproject.toml (kown -> known): sort torch (#127126) 2024-05-27 14:49:57 +00:00
test_custom_ops.py [5/N][Easy] fix typo for usort config in pyproject.toml (kown -> known): sort torch (#127126) 2024-05-27 14:49:57 +00:00
test_export_modes.py [1/N] [Caffe2] Remove caffe2_aten_fallback code (#128675) 2024-06-17 21:25:59 +00:00
test_fx_op_consistency.py Revert "Add decompositions for copy variants of view ops (#128416)" 2024-07-11 22:09:23 +00:00
test_fx_passes.py [ONNX] Skip optimizer when it fails (#127349) 2024-05-30 07:08:45 +00:00
test_fx_to_onnx_decomp_skip.py [ONNX] Add upsample trilinear to skip decomp (#128259) 2024-06-14 21:20:44 +00:00
test_fx_to_onnx_with_onnxruntime.py [ONNX] Remove beartype usage (#130484) 2024-07-18 22:07:40 +00:00
test_fx_to_onnx.py [ONNX] Add upsample trilinear to skip decomp (#128259) 2024-06-14 21:20:44 +00:00
test_fx_type_promotion.py [5/N][Easy] fix typo for usort config in pyproject.toml (kown -> known): sort torch (#127126) 2024-05-27 14:49:57 +00:00
test_models_onnxruntime.py [5/N][Easy] fix typo for usort config in pyproject.toml (kown -> known): sort torch (#127126) 2024-05-27 14:49:57 +00:00
test_models_quantized_onnxruntime.py [5/N][Easy] fix typo for usort config in pyproject.toml (kown -> known): sort torch (#127126) 2024-05-27 14:49:57 +00:00
test_models.py [5/N][Easy] fix typo for usort config in pyproject.toml (kown -> known): sort torch (#127126) 2024-05-27 14:49:57 +00:00
test_onnx_opset.py Add symbolic_opset19.py and symbolic_opset20.py to support opset 19/20, extend opset 18 support (#118828) 2024-03-22 18:01:33 +00:00
test_onnxscript_no_runtime.py [5/N][Easy] fix typo for usort config in pyproject.toml (kown -> known): sort torch (#127126) 2024-05-27 14:49:57 +00:00
test_onnxscript_runtime.py [5/N][Easy] fix typo for usort config in pyproject.toml (kown -> known): sort torch (#127126) 2024-05-27 14:49:57 +00:00
test_op_consistency.py [5/N][Easy] fix typo for usort config in pyproject.toml (kown -> known): sort torch (#127126) 2024-05-27 14:49:57 +00:00
test_operators.py [Caffe2] [2/N] Remove Caffe2 from tests (#128911) 2024-06-19 00:05:50 +00:00
test_pytorch_jit_onnx.py [5/N][Easy] fix typo for usort config in pyproject.toml (kown -> known): sort torch (#127126) 2024-05-27 14:49:57 +00:00
test_pytorch_onnx_no_runtime.py [1/N] [Caffe2] Remove caffe2_aten_fallback code (#128675) 2024-06-17 21:25:59 +00:00
test_pytorch_onnx_onnxruntime_cuda.py [5/N][Easy] fix typo for usort config in pyproject.toml (kown -> known): sort torch (#127126) 2024-05-27 14:49:57 +00:00
test_pytorch_onnx_onnxruntime.py [BE][Easy] apply autofix for ruff rules unnecessary-collection-call (C408): list() / tuple() / dict() (#130199) 2024-07-11 17:30:28 +00:00
test_pytorch_onnx_shape_inference.py [5/N][Easy] fix typo for usort config in pyproject.toml (kown -> known): sort torch (#127126) 2024-05-27 14:49:57 +00:00
test_symbolic_helper.py
test_utility_funs.py [ONNX] Add onnx::Gelu support for version 20 (#128773) 2024-06-19 15:39:02 +00:00
test_verification.py [5/N][Easy] fix typo for usort config in pyproject.toml (kown -> known): sort torch (#127126) 2024-05-27 14:49:57 +00:00
verify.py [BE] enable ruff rule RSE and remove useless parentheses in raise statements (#124261) 2024-04-17 19:29:34 +00:00