-
Notifications
You must be signed in to change notification settings - Fork 207
96 lines (79 loc) · 2.7 KB
/
test_openvino.yml
File metadata and controls
96 lines (79 loc) · 2.7 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
name: OpenVINO - Test
on:
workflow_dispatch:
push:
branches:
- main
- v*-release
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
env:
UV_TORCH_BACKEND: cpu
UV_SYSTEM_PYTHON: true
TRANSFORMERS_IS_CI: true
HF_TOKEN: ${{ secrets.HF_HUB_READ_TOKEN }}
jobs:
build:
strategy:
fail-fast: false
matrix:
test-pattern:
[
"*genai*",
"*export*",
"*decoder*",
"*seq2seq*",
"*modeling*",
"*diffusion*",
"*quantization*",
]
transformers-version: ["4.45.0", "4.57.6", "latest"]
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.test-pattern == '*modeling*' || matrix.test-pattern == '*quantization*' }}
name: Install OpenVINO
run: |
uv pip install openvino==2025.3.0 openvino-tokenizers==2025.3.0
- if: ${{ matrix.transformers-version != 'latest' }}
name: Install transformers
run: |
uv pip install transformers==${{ matrix.transformers-version }}
- if: ${{ matrix.transformers-version == '4.45.0' }}
name: Install specific dependencies and versions required for older transformers
run: |
uv pip install transformers==${{ matrix.transformers-version }} accelerate==0.* peft==0.13.* diffusers==0.32.* transformers_stream_generator
- if: ${{ matrix.transformers-version != '4.45.0' && matrix.test-pattern == '*decoder*'}}
name: Install auto-gptq, autoawq
run: |
uv pip install auto-gptq "autoawq<0.2.8"
- name: Login with fork PRs CI token
if: ${{ env.HF_TOKEN == '' }}
run: |
python tests/scripts/login_with_ci_token.py
- name: Test with Pytest
run: |
pytest tests/openvino/${{ matrix.test-pattern }} --durations=0
- if: ${{ matrix.test-pattern == '*modeling*' }}
name: Install Nightly OpenVINO
run: |
uv pip install --upgrade --pre openvino openvino-tokenizers --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
- if: ${{ matrix.test-pattern == '*modeling*' }}
name: Test with Pytest - Nightly OpenVINO
run: |
pytest tests/openvino/test_modeling_basic.py --durations=0