diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 7952539b0b..aa3709a409 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -37,14 +37,10 @@ jobs: strategy: fail-fast: false matrix: - torch: ["1.8", "1.9", "1.10"] + torch: ["2.2.2"] include: - - torch: "1.8" - torchvision: 0.9 - - torch: "1.9" - torchvision: "0.10" - - torch: "1.10" - torchvision: "0.11.1" + - torch: "2.2.2" + torchvision: "0.17.2" env: # point datasets to ~/.torch so it's cached by CI DETECTRON2_DATASETS: ~/.torch/datasets @@ -66,11 +62,13 @@ jobs: - name: Install dependencies run: | python -m pip install -U pip - python -m pip install ninja opencv-python-headless onnx pytest-xdist + python -m pip install wheel ninja opencv-python-headless onnx pytest-xdist python -m pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html # install from github to get latest; install iopath first since fvcore depends on it python -m pip install -U 'git+https://github.com/facebookresearch/iopath' python -m pip install -U 'git+https://github.com/facebookresearch/fvcore' + wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py + python collect_env.py - name: Build and install run: | diff --git a/tests/test_export_onnx.py b/tests/test_export_onnx.py index aa15e1a406..e5c3d6e17e 100644 --- a/tests/test_export_onnx.py +++ b/tests/test_export_onnx.py @@ -3,7 +3,9 @@ import io import unittest import warnings +import onnx import torch +from packaging import version from torch.hub import _check_module_exists from detectron2 import model_zoo @@ -95,6 +97,10 @@ def inference_func(model, image): inference_func, ) + @unittest.skipIf( + version.Version(onnx.version.version) == version.Version("1.16.0"), + "This test fails on ONNX Runtime 1.16", + ) def testKeypointHead(self): class M(torch.nn.Module): def __init__(self):