Skip to content

Commit

Permalink
Upgrade PT to 1.9.0 in unit-test (#161)
Browse files Browse the repository at this point in the history
* Cleanup test_models.py

* Move test_torchscript to test_models

* Minor fixes

* Update pytorch to 1.9.0 in unit-tests

* Move to torch.testing.assert_assert_close

* Rename to test_models_transform.py

* Temporarily close the tests here
  • Loading branch information
zhiqwang authored Sep 10, 2021
1 parent b6d8e00 commit 96562f0
Show file tree
Hide file tree
Showing 12 changed files with 164 additions and 492 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
Loading

0 comments on commit 96562f0

Please sign in to comment.