From 441f0245a7b226b5bf4e1a0393bc9d2c117a5551 Mon Sep 17 00:00:00 2001 From: Justin Chu Date: Wed, 25 May 2022 09:23:46 -0700 Subject: [PATCH] Updated PyTorch ONNX exporter (markdown) --- PyTorch-ONNX-exporter.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PyTorch-ONNX-exporter.md b/PyTorch-ONNX-exporter.md index 2424a4a..cf796db 100644 --- a/PyTorch-ONNX-exporter.md +++ b/PyTorch-ONNX-exporter.md @@ -253,9 +253,9 @@ For example: ```sh # run test for opset 11 -python test/onnx/test_pytorch_onnx_onnxruntime.py TestONNXRuntime_opset11.test_arithmetic_prim_bool +python -m pytest test/onnx/test_pytorch_onnx_onnxruntime.py::TestONNXRuntime_opset11::test_arithmetic_prim_bool # run test for opset 9 -python test/onnx/test_pytorch_onnx_onnxruntime.py TestONNXRuntime_opset9.test_arithmetic_prim_bool +python -m pytest test/onnx/test_pytorch_onnx_onnxruntime.py::TestONNXRuntime_opset9::test_arithmetic_prim_bool ``` An example of adding unit tests for a new symbolic function: [Add binary_cross_entropy_with_logits op](https://github.com/pytorch/pytorch/pull/49675) @@ -263,7 +263,7 @@ An example of adding unit tests for a new symbolic function: [Add binary_cross_e You can use `pytest` to run tests in parallel and generate a coverage report. ```sh -pytest -n auto --cov --cov-report "xml:test/coverage.xml" test/onnx/test_pytorch_onnx_onnxruntime.py +python -m pytest -n auto --cov --cov-report "xml:test/coverage.xml" test/onnx/test_pytorch_onnx_onnxruntime.py ``` # Links