Skip to content

Commit

Permalink
Skip same tests in ONNX Python3 CI as in Python2 (pytorch#31827)
Browse files Browse the repository at this point in the history
Summary:
resolve pytorch#31103

vgg models were not tested in Python2 but are turned on in Python3
Pull Request resolved: pytorch#31827

Reviewed By: houseroad

Differential Revision: D19274123

Pulled By: bddppq

fbshipit-source-id: c48beb574e8b03b2adbd6c9d8ca3f600bee93024
  • Loading branch information
bddppq authored and facebook-github-bot committed Jan 3, 2020
1 parent 79e30ff commit b44c0f3
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions scripts/onnx/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,14 @@ if [[ $PARALLEL == 1 ]]; then
args+=("3")
fi

# Skipped tests
args+=("-k")
args+=('not (TestOperators and test_full_like) and not (TestOperators and test_zeros_like) and not (TestOperators and test_ones_like) and not (TestModels and test_vgg16) and not (TestModels and test_vgg16_bn) and not (TestModels and test_vgg19) and not (TestModels and test_vgg19_bn)')

# These exclusions are for tests that take a long time / a lot of GPU
# memory to run; they should be passing (and you will test them if you
# run them locally
pytest "${args[@]}" \
-k \
'not (TestOperators and test_full_like) and not (TestOperators and test_zeros_like) and not (TestOperators and test_ones_like) and not (TestModels and test_vgg16) and not (TestModels and test_vgg16_bn) and not (TestModels and test_vgg19) and not (TestModels and test_vgg19_bn)' \
--ignore "$top_dir/test/onnx/test_pytorch_onnx_onnxruntime.py" \
--ignore "$top_dir/test/onnx/test_custom_ops.py" \
--ignore "$top_dir/test/onnx/test_models_onnxruntime.py" \
Expand All @@ -57,8 +59,8 @@ pytest "${args[@]}" \
# onnxruntime only support py3
# "Python.h" not found in py2, needed by TorchScript custom op compilation.
if [[ "$BUILD_ENVIRONMENT" == *py3* ]]; then
pytest "${args[@]}" "$top_dir/test/onnx/test_pytorch_onnx_onnxruntime.py"
pytest "${args[@]}" "$top_dir/test/onnx/test_custom_ops.py"
pytest "${args[@]}" "$top_dir/test/onnx/test_models_onnxruntime.py"
pytest "${args[@]}" \
"$top_dir/test/onnx/test_pytorch_onnx_onnxruntime.py" \
"$top_dir/test/onnx/test_custom_ops.py" \
"$top_dir/test/onnx/test_models_onnxruntime.py"
fi

0 comments on commit b44c0f3

Please sign in to comment.