Skip to content

CI PyTorchObjectDetectors #18

CI PyTorchObjectDetectors

CI PyTorchObjectDetectors #18

name: CI PyTorchObjectDetectors
on:
# Run on manual trigger
workflow_dispatch:
# Run on pull requests
pull_request:
paths-ignore:
- '*.md'
# Run on merge queue
merge_group:
# Run when pushing to main or dev branches
push:
branches:
- main
- dev*
# Run scheduled CI flow daily
schedule:
- cron: '0 8 * * 0'
jobs:
test_pytorch_fasterrcnn:
name: PyTorchObjectDetectors
runs-on: ubuntu-20.04
strategy:
fail-fast: false
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get -y -q install ffmpeg libavcodec-extra
python -m pip install --upgrade pip setuptools wheel
pip3 install -q -r requirements_test.txt
pip list
- name: Pre-install torch
run: |
pip install torch==1.12.1+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
pip install torchvision==0.13.1+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
pip install torchaudio==0.12.1+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
- name: Run Test Action - test_pytorch_object_detector
run: pytest --cov-report=xml --cov=art --cov-append -q -vv tests/estimators/object_detection/test_pytorch_object_detector.py --framework=pytorch --durations=0
- name: Run Test Action - test_pytorch_faster_rcnn
run: pytest --cov-report=xml --cov=art --cov-append -q -vv tests/estimators/object_detection/test_pytorch_faster_rcnn.py --framework=pytorch --durations=0
- name: Run Test Action - test_pytorch_detection_transformer
run: pytest --cov-report=xml --cov=art --cov-append -q -vv tests/estimators/object_detection/test_pytorch_detection_transformer.py --framework=pytorch --durations=0
- name: Run Test Action - test_pytorch_object_seeker_faster_rcnn
run: pytest --cov-report=xml --cov=art --cov-append -q -vv tests/estimators/object_detection/test_object_seeker_faster_rcnn.py --framework=pytorch --durations=0
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true