Skip to content

Commit

Permalink
Add a full OV testing GHA workflow for nightly (#985)
Browse files Browse the repository at this point in the history
* Add a separate ov nightly GHA workflow

Update workflow name

Trigger Tests

Fix workflow file

Fix

Introduce more readable job names

Revert basic test changes

* Remove ov-nightly and nncf-develop from slow tests

* Use Python 3.9

* Add a combination for ov-stable and nncf-develop

* Remove large model after testing

* Revert "Remove large model after testing"

This reverts commit 3e8ce54.

* Temporary cache dir

* Revert "Temporary cache dir"

This reverts commit 3fe8ed2.

* Lower verbosity

* Reorder install commands

* Trigger Tests

* Move transformers installation to the end

* Update .github/workflows/test_openvino_slow.yml

---------

Co-authored-by: Ilyas Moutawwakil <[email protected]>
  • Loading branch information
nikita-savelyevv and IlyasMoutawwakil authored Dec 5, 2024
1 parent 41f0a46 commit 958eb6e
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 8 deletions.
88 changes: 88 additions & 0 deletions .github/workflows/test_openvino_full.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: OpenVINO - Full Test

on:
workflow_dispatch:
schedule:
- cron: "41 3 * * *" # run every day at 3:41
push:
branches:
- v*-release
pull_request:
types: [opened, synchronize, reopened, labeled]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
if: ${{ (github.event_name == 'workflow_dispatch') || (github.event_name == 'schedule') || (github.event_name == 'push') || contains( github.event.pull_request.labels.*.name, 'openvino-test') }}
strategy:
fail-fast: false
matrix:
include:
- python-version: "3.9"
os: "ubuntu-22.04"
transformers-version: "latest"
openvino: "ov-stable"
nncf: "nncf-stable"
- python-version: "3.9"
os: "ubuntu-22.04"
transformers-version: "latest"
openvino: "ov-nightly"
nncf: "nncf-stable"
- python-version: "3.9"
os: "ubuntu-22.04"
transformers-version: "latest"
openvino: "ov-stable"
nncf: "nncf-develop"
- python-version: "3.9"
os: "ubuntu-22.04"
transformers-version: "latest"
openvino: "ov-nightly"
nncf: "nncf-develop"

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
# Install PyTorch CPU to prevent unnecessary downloading/installing of CUDA packages
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip install .[tests]
- name: Install openvino-nightly
if: ${{ matrix.openvino == 'ov-nightly' }}
run: pip install --pre -U openvino openvino-tokenizers --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly

- name: Install openvino release
if: ${{ matrix.openvino == 'ov-stable' }}
run: pip install .[openvino]

- name: Install nncf develop
if: ${{ matrix.nncf == 'nncf-develop' }}
run: pip install git+https://github.com/openvinotoolkit/nncf.git

- name: Install nncf release
if: ${{ matrix.nncf == 'nncf-stable' }}
run: pip install .[nncf]

- name: Install the lowest compatible transformers version
if: ${{ matrix.transformers-version != 'latest' }}
run: pip install transformers==${{ matrix.transformers-version }}

- name: Pip freeze
run: pip freeze

- name: OpenVINO tests
run: pytest tests/openvino --durations=0
env:
RUN_SLOW: 1
HF_HUB_READ_TOKEN: ${{ secrets.HF_HUB_READ_TOKEN }}
13 changes: 5 additions & 8 deletions .github/workflows/test_openvino_slow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-22.04", "windows-2019"]
openvino-version: ["stable", "nightly"]
transformers-version: ["4.36.0", "latest"]
nncf: ["nncf", "git+https://github.com/openvinotoolkit/nncf.git"]

runs-on: ${{ matrix.os }}

Expand All @@ -47,11 +45,6 @@ jobs:
pip install .[openvino,tests] transformers[testing]
pip uninstall -y nncf
- if: ${{ matrix.openvino-version == 'nightly' }}
name: Install nightly OpenVINO
run: |
pip install openvino openvino-tokenizers --pre --upgrade --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
- if: ${{ matrix.transformers-version != 'latest' }}
name: Downgrade Transformers and Accelerate
run: pip install transformers==${{ matrix.transformers-version }} accelerate==0.*
Expand All @@ -65,7 +58,11 @@ jobs:
- name: Install dependencies (slow)
run: |
pip install ${{ matrix.nncf }}
pip install .[nncf]
- if: ${{ matrix.transformers-version != 'latest' }}
name: Downgrade Transformers and Accelerate
run: pip install transformers==${{ matrix.transformers-version }} accelerate==0.*

- name: Test with Pytest (slow)
run: |
Expand Down

0 comments on commit 958eb6e

Please sign in to comment.