From 1c9605f9b88f8b3074d95a522f3ea446d241bb00 Mon Sep 17 00:00:00 2001 From: Zhiqiang Wang Date: Fri, 10 Sep 2021 04:03:57 -0400 Subject: [PATCH] Update pytorch to 1.9.0 in unit-tests --- .github/workflows/ci_test.yml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci_test.yml b/.github/workflows/ci_test.yml index 5ccf6793..8e63086f 100644 --- a/.github/workflows/ci_test.yml +++ b/.github/workflows/ci_test.yml @@ -16,17 +16,11 @@ jobs: matrix: python-version: [3.7] os: [ubuntu-latest] - torch: [1.7.1+cpu, 1.8.1+cpu] # nightly + torch: [1.9.0+cpu] include: - - torch: 1.7.1+cpu - pip_address: torch==1.7.1+cpu torchvision==0.8.2+cpu -f https://download.pytorch.org/whl/torch_stable.html + - torch: 1.9.0+cpu + pip_address: torch==1.9.0+cpu torchvision==0.10.0+cpu -f https://download.pytorch.org/whl/torch_stable.html unittest_type: --cov=test --cov-report=xml - - torch: 1.8.1+cpu - pip_address: torch==1.8.1+cpu torchvision==0.9.1+cpu -f https://download.pytorch.org/whl/torch_stable.html - unittest_type: --cov=test --cov-report=xml - # - torch: nightly - # pip_address: --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html - # unittest_type: test steps: - name: Clone repository @@ -65,7 +59,6 @@ jobs: PYTORCH_TEST_WITH_SLOW=1 pytest ${{ matrix.unittest_type }} - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 - if: matrix.torch == '1.8.1+cpu' with: token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.xml @@ -75,23 +68,20 @@ jobs: fail_ci_if_error: true verbose: true - name: Build TorchVision Cpp ${{ matrix.torch }} - if: matrix.torch == '1.8.1+cpu' run: | export TORCH_PATH=$(dirname $(python -c "import torch; print(torch.__file__)")) cd .. git clone https://github.com/pytorch/vision.git vision cd vision - git checkout release/0.9 + git checkout release/0.10 mkdir build && cd build cmake .. -DTorch_DIR=$TORCH_PATH/share/cmake/Torch make -j4 sudo make install - name: Export torchscript model - if: matrix.torch == '1.8.1+cpu' run: | python -m test.tracing.trace_model - name: Test libtorch tracing - if: matrix.torch == '1.8.1+cpu' run: | export TORCH_PATH=$(dirname $(python -c "import torch; print(torch.__file__)")) export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TORCH_PATH/lib/