mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[ONNX] Expose the testing module (#162495)
* Created a new module `torch/onnx/testing.py` that exposes the `assert_onnx_program` function for testing exported ONNX models. * Updated the ONNX documentation (`docs/source/onnx.md`) to include `onnx_testing` in the list of relevant modules. Pull Request resolved: https://github.com/pytorch/pytorch/pull/162495 Approved by: https://github.com/titaiwangms, https://github.com/xadupre
This commit is contained in:
committed by
PyTorch MergeBot
parent
878f59ef75
commit
c66e58b7d0
@ -102,6 +102,7 @@ also be interested in reading our [development wiki](https://github.com/pytorch/
|
||||
onnx_export
|
||||
onnx_ops
|
||||
onnx_verification
|
||||
onnx_testing
|
||||
```
|
||||
|
||||
### Deprecated APIs
|
||||
|
9
docs/source/onnx_testing.md
Normal file
9
docs/source/onnx_testing.md
Normal file
@ -0,0 +1,9 @@
|
||||
# torch.onnx.testing
|
||||
|
||||
```{eval-rst}
|
||||
.. automodule:: torch.onnx.testing
|
||||
```
|
||||
|
||||
```{eval-rst}
|
||||
.. autofunction:: torch.onnx.testing.assert_onnx_program
|
||||
```
|
8
torch/onnx/testing.py
Normal file
8
torch/onnx/testing.py
Normal file
@ -0,0 +1,8 @@
|
||||
"""Utilities to aid in testing exported ONNX models."""
|
||||
|
||||
__all__ = ["assert_onnx_program"]
|
||||
|
||||
from torch.onnx._internal.exporter._testing import assert_onnx_program
|
||||
|
||||
|
||||
assert_onnx_program.__module__ = "torch.onnx.testing"
|
Reference in New Issue
Block a user