diff --git a/PyTorch-ONNX-exporter.md b/PyTorch-ONNX-exporter.md index 86c6d7e..2424a4a 100644 --- a/PyTorch-ONNX-exporter.md +++ b/PyTorch-ONNX-exporter.md @@ -75,7 +75,7 @@ export DEBUG=1 Install the dependencies required to run CI checks locally. ```sh -conda install -c conda-forge expecttest pytest mypy=0.950 flake8 hypothesis +conda install -c conda-forge expecttest pytest mypy=0.950 flake8 hypothesis pytest-cov pytest-xdist ``` #### ONNX and ONNX Runtime @@ -260,6 +260,12 @@ python test/onnx/test_pytorch_onnx_onnxruntime.py TestONNXRuntime_opset9.test_ar 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) +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 +``` + # Links - [User-facing docs](https://pytorch.org/docs/master/onnx.html).