Skip to content

Commit

Permalink
fix Github actions
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: #5274

Differential Revision: D56911192
  • Loading branch information
Yanghan Wang authored and facebook-github-bot committed May 3, 2024
1 parent 99bf0a0 commit ce9c1c6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: |
Expand Down
6 changes: 6 additions & 0 deletions tests/test_export_onnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit ce9c1c6

Please sign in to comment.