Skip to content

Commit 958eb6e

Browse files
Add a full OV testing GHA workflow for nightly (#985)
* 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]>
1 parent 41f0a46 commit 958eb6e

File tree

2 files changed

+93
-8
lines changed

2 files changed

+93
-8
lines changed
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: OpenVINO - Full Test
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "41 3 * * *" # run every day at 3:41
7+
push:
8+
branches:
9+
- v*-release
10+
pull_request:
11+
types: [opened, synchronize, reopened, labeled]
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build:
19+
if: ${{ (github.event_name == 'workflow_dispatch') || (github.event_name == 'schedule') || (github.event_name == 'push') || contains( github.event.pull_request.labels.*.name, 'openvino-test') }}
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
include:
24+
- python-version: "3.9"
25+
os: "ubuntu-22.04"
26+
transformers-version: "latest"
27+
openvino: "ov-stable"
28+
nncf: "nncf-stable"
29+
- python-version: "3.9"
30+
os: "ubuntu-22.04"
31+
transformers-version: "latest"
32+
openvino: "ov-nightly"
33+
nncf: "nncf-stable"
34+
- python-version: "3.9"
35+
os: "ubuntu-22.04"
36+
transformers-version: "latest"
37+
openvino: "ov-stable"
38+
nncf: "nncf-develop"
39+
- python-version: "3.9"
40+
os: "ubuntu-22.04"
41+
transformers-version: "latest"
42+
openvino: "ov-nightly"
43+
nncf: "nncf-develop"
44+
45+
runs-on: ${{ matrix.os }}
46+
47+
steps:
48+
- uses: actions/checkout@v4
49+
- name: Setup Python ${{ matrix.python-version }}
50+
uses: actions/setup-python@v5
51+
with:
52+
python-version: ${{ matrix.python-version }}
53+
54+
- name: Install dependencies
55+
run: |
56+
python -m pip install --upgrade pip
57+
# Install PyTorch CPU to prevent unnecessary downloading/installing of CUDA packages
58+
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
59+
pip install .[tests]
60+
61+
- name: Install openvino-nightly
62+
if: ${{ matrix.openvino == 'ov-nightly' }}
63+
run: pip install --pre -U openvino openvino-tokenizers --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
64+
65+
- name: Install openvino release
66+
if: ${{ matrix.openvino == 'ov-stable' }}
67+
run: pip install .[openvino]
68+
69+
- name: Install nncf develop
70+
if: ${{ matrix.nncf == 'nncf-develop' }}
71+
run: pip install git+https://github.com/openvinotoolkit/nncf.git
72+
73+
- name: Install nncf release
74+
if: ${{ matrix.nncf == 'nncf-stable' }}
75+
run: pip install .[nncf]
76+
77+
- name: Install the lowest compatible transformers version
78+
if: ${{ matrix.transformers-version != 'latest' }}
79+
run: pip install transformers==${{ matrix.transformers-version }}
80+
81+
- name: Pip freeze
82+
run: pip freeze
83+
84+
- name: OpenVINO tests
85+
run: pytest tests/openvino --durations=0
86+
env:
87+
RUN_SLOW: 1
88+
HF_HUB_READ_TOKEN: ${{ secrets.HF_HUB_READ_TOKEN }}

.github/workflows/test_openvino_slow.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ jobs:
2525
fail-fast: false
2626
matrix:
2727
os: ["ubuntu-22.04", "windows-2019"]
28-
openvino-version: ["stable", "nightly"]
2928
transformers-version: ["4.36.0", "latest"]
30-
nncf: ["nncf", "git+https://github.com/openvinotoolkit/nncf.git"]
3129

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

@@ -47,11 +45,6 @@ jobs:
4745
pip install .[openvino,tests] transformers[testing]
4846
pip uninstall -y nncf
4947
50-
- if: ${{ matrix.openvino-version == 'nightly' }}
51-
name: Install nightly OpenVINO
52-
run: |
53-
pip install openvino openvino-tokenizers --pre --upgrade --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
54-
5548
- if: ${{ matrix.transformers-version != 'latest' }}
5649
name: Downgrade Transformers and Accelerate
5750
run: pip install transformers==${{ matrix.transformers-version }} accelerate==0.*
@@ -65,7 +58,11 @@ jobs:
6558
6659
- name: Install dependencies (slow)
6760
run: |
68-
pip install ${{ matrix.nncf }}
61+
pip install .[nncf]
62+
63+
- if: ${{ matrix.transformers-version != 'latest' }}
64+
name: Downgrade Transformers and Accelerate
65+
run: pip install transformers==${{ matrix.transformers-version }} accelerate==0.*
6966

7067
- name: Test with Pytest (slow)
7168
run: |

0 commit comments

Comments
 (0)