-
Notifications
You must be signed in to change notification settings - Fork 207
135 lines (118 loc) · 4.05 KB
/
test_openvino_nightly.yml
File metadata and controls
135 lines (118 loc) · 4.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
name: OpenVINO - Nightly Test
on:
workflow_dispatch:
schedule:
# run every day at 4:41
- cron: "41 4 * * *"
push:
branches:
- v*-release
pull_request:
branches:
- main
types:
- opened
- labeled
- reopened
- unlabeled
- synchronize
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
env:
RUN_SLOW: true
UV_TORCH_BACKEND: cpu
UV_SYSTEM_PYTHON: true
TRANSFORMERS_IS_CI: true
HF_TOKEN: ${{ secrets.HF_HUB_READ_TOKEN }}
jobs:
build:
if: ${{ (github.event_name == 'workflow_dispatch') || (github.event_name == 'schedule') || (github.event_name == 'push') || contains( github.event.pull_request.labels.*.name, 'openvino-nightly') }}
strategy:
fail-fast: false
matrix:
# stable and nightly openvino tests
openvino-version: ["openvino-stable", "openvino-nightly"]
nncf-version: ["nncf-stable"]
test-pattern:
[
"*genai*",
"*export*",
"*decoder*",
"*seq2seq*",
"*modeling*",
"*diffusion*",
"*quantization*",
]
export-mode: ["torchscript"]
include:
# stable openvino + nncf develop tests
- nncf-version: "nncf-develop"
openvino-version: "openvino-stable"
test-pattern: "*{quantization,export}*"
# nightly openvino + nncf develop tests
- nncf-version: "nncf-develop"
openvino-version: "openvino-nightly"
test-pattern: "*{quantization,export}*"
- nncf-version: "nncf-stable"
openvino-version: "openvino-stable"
export-mode: "torchdynamo"
test-pattern: "*{quantization,export}*"
- nncf-version: "nncf-stable"
openvino-version: "openvino-stable"
export-mode: "torchdynamo"
test-pattern: "*modeling*"
- nncf-version: "nncf-stable"
openvino-version: "openvino-stable"
export-mode: "torchdynamo"
test-pattern: "*decoder*"
- nncf-version: "nncf-stable"
openvino-version: "openvino-stable"
export-mode: "torchdynamo"
test-pattern: "*seq2seq*"
- nncf-version: "nncf-stable"
openvino-version: "openvino-stable"
export-mode: "torchdynamo"
test-pattern: "*diffusion*"
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip install --upgrade pip uv
uv pip install .[tests] librosa diffusers
- if: ${{ matrix.transformers-version == 'latest' }}
name: Install diffusers
run: |
uv pip install git+https://github.com/huggingface/diffusers
- if: ${{ matrix.openvino-version == 'openvino-nightly' }}
name: Install OpenVINO Nightly
run: |
uv pip install --upgrade --pre openvino openvino-tokenizers openvino-genai --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
- if: ${{ matrix.nncf-version == 'nncf-develop' }}
name: Install NNCF from main
run: |
pip install git+https://github.com/openvinotoolkit/nncf.git
- if: ${{ matrix.test-pattern == '*decoder*'}}
name: Install auto-gptq, autoawq
run: |
uv pip install auto-gptq "autoawq<0.2.8" --extra-index-url https://download.pytorch.org/whl/cpu
- name: Login with fork PRs CI token
if: ${{ env.HF_TOKEN == '' }}
run: |
python tests/scripts/login_with_ci_token.py
- name: Pip freeze
run: |
pip freeze
- name: Test with Pytest
env:
OPENVINO_DYNAMO_EXPORT: ${{ matrix.export-mode == 'torchdynamo' }}
run: |
pytest tests/openvino/${{ matrix.test-pattern }} --durations=0