Skip to content

Remove datasets as required dependency #2699

Remove datasets as required dependency

Remove datasets as required dependency #2699

name: OpenVINO - Slow Test
on:
workflow_dispatch:
push:
branches:
- v*-release
pull_request:
types:
- opened
- labeled
- reopened
- 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
jobs:
build:
if: ${{ (github.event_name == 'workflow_dispatch') || (github.event_name == 'schedule') || (github.event_name == 'push') || contains( github.event.pull_request.labels.*.name, 'openvino-slow') }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-22.04", "windows-2022"]
transformers-version: ["4.45.0", "latest"]
include:
- transformers-version: "main"
os: "ubuntu-22.04"
runs-on: ${{ matrix.os }}
steps:
- name: Free Disk Space (Ubuntu)
if: matrix.runs-on == 'ubuntu-22.04'
uses: jlumbroso/free-disk-space@main
- 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,tests,diffusers] transformers[testing]
- if: ${{ matrix.transformers-version != 'latest' && matrix.transformers-version != 'main' }}
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 == 'main' }}
name: Install transformers from repository
run: |
uv pip install git+https://github.com/huggingface/transformers.git
- if: ${{ matrix.transformers-version == 'latest' && matrix.os != 'windows-2022' || matrix.transformers-version == 'main' }}
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: Pip freeze
run: |
pip freeze
- name: Test with Pytest (basic)
run: |
pytest tests/openvino/test_modeling_basic.py
- name: Test with Pytest (slow)
run: |
pytest tests/openvino -m "run_slow" --durations=0