Unverified Commit 247374bf authored by Philip Meier's avatar Philip Meier Committed by GitHub
Browse files

add CI job for prototype tests (#4664)



* add CI job for prototype tests

* register prototype job

* fix torchvision installation

* fix test invocation

* ignore prototype tests in normal unittests
Co-authored-by: default avatarVasilis Vryniotis <datumbox@users.noreply.github.com>
parent ac56b487
...@@ -254,6 +254,27 @@ jobs: ...@@ -254,6 +254,27 @@ jobs:
pip install --user pytest pip install --user pytest
python test/test_onnx.py python test/test_onnx.py
prototype_test:
docker:
- image: circleci/python:3.7
steps:
- run:
name: Install torch
command: pip install --user --progress-bar=off --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
- run:
name: Install prototype dependencies
command: pip install --user --progress-bar=off git+https://github.com/pytorch/data.git
- checkout
- run:
name: Install torchvision
command: pip install --user --progress-bar off --no-build-isolation .
- run:
name: Install test utilities
command: pip install --user --progress-bar=off pytest
- run:
name: Run tests
command: pytest test/test_prototype_*.py
binary_linux_wheel: binary_linux_wheel:
<<: *binary_common <<: *binary_common
docker: docker:
...@@ -1479,6 +1500,7 @@ workflows: ...@@ -1479,6 +1500,7 @@ workflows:
- clang_format - clang_format
- torchhub_test - torchhub_test
- torch_onnx_test - torch_onnx_test
- prototype_test
- binary_ios_build: - binary_ios_build:
build_environment: binary-libtorchvision_ops-ios-12.0.0-x86_64 build_environment: binary-libtorchvision_ops-ios-12.0.0-x86_64
ios_arch: x86_64 ios_arch: x86_64
...@@ -1639,6 +1661,7 @@ workflows: ...@@ -1639,6 +1661,7 @@ workflows:
- clang_format - clang_format
- torchhub_test - torchhub_test
- torch_onnx_test - torch_onnx_test
- prototype_test
- binary_ios_build: - binary_ios_build:
build_environment: nightly-binary-libtorchvision_ops-ios-12.0.0-x86_64 build_environment: nightly-binary-libtorchvision_ops-ios-12.0.0-x86_64
filters: filters:
......
...@@ -254,6 +254,27 @@ jobs: ...@@ -254,6 +254,27 @@ jobs:
pip install --user pytest pip install --user pytest
python test/test_onnx.py python test/test_onnx.py
prototype_test:
docker:
- image: circleci/python:3.7
steps:
- run:
name: Install torch
command: pip install --user --progress-bar=off --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
- run:
name: Install prototype dependencies
command: pip install --user --progress-bar=off git+https://github.com/pytorch/data.git
- checkout
- run:
name: Install torchvision
command: pip install --user --progress-bar off --no-build-isolation .
- run:
name: Install test utilities
command: pip install --user --progress-bar=off pytest
- run:
name: Run tests
command: pytest test/test_prototype_*.py
binary_linux_wheel: binary_linux_wheel:
<<: *binary_common <<: *binary_common
docker: docker:
...@@ -977,6 +998,7 @@ workflows: ...@@ -977,6 +998,7 @@ workflows:
- clang_format - clang_format
- torchhub_test - torchhub_test
- torch_onnx_test - torch_onnx_test
- prototype_test
{{ ios_workflows() }} {{ ios_workflows() }}
{{ android_workflows() }} {{ android_workflows() }}
...@@ -998,6 +1020,7 @@ workflows: ...@@ -998,6 +1020,7 @@ workflows:
- clang_format - clang_format
- torchhub_test - torchhub_test
- torch_onnx_test - torch_onnx_test
- prototype_test
{{ ios_workflows(nightly=True) }} {{ ios_workflows(nightly=True) }}
{{ android_workflows(nightly=True) }} {{ android_workflows(nightly=True) }}
{{ build_workflows(prefix="nightly_", filter_branch="nightly", upload=True) }} {{ build_workflows(prefix="nightly_", filter_branch="nightly", upload=True) }}
......
...@@ -26,10 +26,6 @@ fi ...@@ -26,10 +26,6 @@ fi
printf "Installing PyTorch with %s\n" "${cudatoolkit}" printf "Installing PyTorch with %s\n" "${cudatoolkit}"
conda install -y -c "pytorch-${UPLOAD_CHANNEL}" "pytorch-${UPLOAD_CHANNEL}"::pytorch "${cudatoolkit}" pytest conda install -y -c "pytorch-${UPLOAD_CHANNEL}" "pytorch-${UPLOAD_CHANNEL}"::pytorch "${cudatoolkit}" pytest
printf "Installing torchdata from source"
pip install git+https://github.com/pytorch/data.git
if [ $PYTHON_VERSION == "3.6" ]; then if [ $PYTHON_VERSION == "3.6" ]; then
printf "Installing minimal PILLOW version\n" printf "Installing minimal PILLOW version\n"
# Install the minimal PILLOW version. Otherwise, let setup.py install the latest # Install the minimal PILLOW version. Otherwise, let setup.py install the latest
......
...@@ -7,4 +7,4 @@ conda activate ./env ...@@ -7,4 +7,4 @@ conda activate ./env
export PYTORCH_TEST_WITH_SLOW='1' export PYTORCH_TEST_WITH_SLOW='1'
python -m torch.utils.collect_env python -m torch.utils.collect_env
pytest --cov=torchvision --junitxml=test-results/junit.xml -v --durations 20 test --ignore=test/test_datasets_download.py pytest --cov=torchvision --junitxml=test-results/junit.xml -v --durations 20
...@@ -29,10 +29,6 @@ printf "Installing PyTorch with %s\n" "${cudatoolkit}" ...@@ -29,10 +29,6 @@ printf "Installing PyTorch with %s\n" "${cudatoolkit}"
# conda-forge channel is required for cudatoolkit 11.1 on Windows, see https://github.com/pytorch/vision/issues/4458 # conda-forge channel is required for cudatoolkit 11.1 on Windows, see https://github.com/pytorch/vision/issues/4458
conda install -y -c "pytorch-${UPLOAD_CHANNEL}" -c conda-forge "pytorch-${UPLOAD_CHANNEL}"::pytorch "${cudatoolkit}" pytest conda install -y -c "pytorch-${UPLOAD_CHANNEL}" -c conda-forge "pytorch-${UPLOAD_CHANNEL}"::pytorch "${cudatoolkit}" pytest
printf "Installing torchdata from source"
pip install git+https://github.com/pytorch/data.git
if [ $PYTHON_VERSION == "3.6" ]; then if [ $PYTHON_VERSION == "3.6" ]; then
printf "Installing minimal PILLOW version\n" printf "Installing minimal PILLOW version\n"
# Install the minimal PILLOW version. Otherwise, let setup.py install the latest # Install the minimal PILLOW version. Otherwise, let setup.py install the latest
......
...@@ -10,4 +10,4 @@ source "$this_dir/set_cuda_envs.sh" ...@@ -10,4 +10,4 @@ source "$this_dir/set_cuda_envs.sh"
export PYTORCH_TEST_WITH_SLOW='1' export PYTORCH_TEST_WITH_SLOW='1'
python -m torch.utils.collect_env python -m torch.utils.collect_env
pytest --cov=torchvision --junitxml=test-results/junit.xml -v --durations 20 test --ignore=test/test_datasets_download.py pytest --cov=torchvision --junitxml=test-results/junit.xml -v --durations 20
...@@ -6,5 +6,7 @@ addopts = ...@@ -6,5 +6,7 @@ addopts =
--tb=native --tb=native
# enable all warnings # enable all warnings
-Wd -Wd
--ignore=test/test_datasets_download.py
--ignore-glob=test/test_prototype_*.py
testpaths = testpaths =
test test
def test_smoke():
import torchvision.prototype.datasets # noqa: F401
def test_smoke():
import torchvision.prototype.models # noqa: F401
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment