Skip to content

Commit

Permalink
Update pytorch to 1.9.0 in unit-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiqwang committed Sep 10, 2021
1 parent 57db1e8 commit 1c9605f
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions .github/workflows/ci_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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/
Expand Down

0 comments on commit 1c9605f

Please sign in to comment.