Remove datasets as required dependency #7534
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
test-pattern: | |
[ | |
"*export*", | |
"*decoder*", | |
"*seq2seq*", | |
"*modeling*", | |
"*diffusion*", | |
"*quantization*", | |
] | |
transformers-version: ["4.45.0", "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.9 | |
- name: Install dependencies | |
run: | | |
pip install --upgrade pip uv | |
uv pip install .[openvino,diffusers,tests] | |
- if: ${{ matrix.transformers-version != 'latest' }} | |
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 == 'latest' && matrix.test-pattern == '*decoder*'}} | |
name: Install auto-gptq, autoawq | |
run: | | |
uv pip install auto-gptq "autoawq<0.2.8" | |
- name: Login with CI 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 |