Skip to content

[OpenVINO] Add model inference check to weight-only and pipeline quantization testing #6475

[OpenVINO] Add model inference check to weight-only and pipeline quantization testing

[OpenVINO] Add model inference check to weight-only and pipeline quantization testing #6475

Workflow file for this run

name: IPEX - Test
on:
push:
branches:
- main
- v*-release
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
TRANSFORMERS_IS_CI: true
jobs:
build:
strategy:
fail-fast: false
matrix:
transformers-version: ["4.51.0", "4.52.*"]
torch-version: ["2.7.0"]
test-file:
[test_modeling.py, test_pipelines.py, test_modeling_causal_lm.py]
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
pip install torch==${{ matrix.torch-version }} torchaudio torchvision --extra-index-url https://download.pytorch.org/whl/cpu
pip install .[ipex,tests] transformers[testing]==${{ matrix.transformers-version }} intel_extension_for_pytorch==${{ matrix.torch-version }}
- name: Install bitsandbytes
if: matrix.test-file == 'test_modeling_causal_lm.py'
run: |
git clone --branch multi-backend-refactor https://github.com/bitsandbytes-foundation/bitsandbytes.git
cd bitsandbytes
pip install .
- name: Install autoawq
if: matrix.test-file == 'test_modeling_causal_lm.py'
run: |
git clone https://github.com/casper-hansen/AutoAWQ.git
cd AutoAWQ
pip install .
pip uninstall triton -y
- name: Assert versions
run: |
python -c "import torch; print(torch.__version__); assert torch.__version__.startswith('${{ matrix.torch-version }}'.replace('.*', ''))"
python -c "import intel_extension_for_pytorch; print(intel_extension_for_pytorch.__version__); assert intel_extension_for_pytorch.__version__.startswith('${{ matrix.torch-version }}'.replace('.*', ''))"
python -c "import transformers; print(transformers.__version__); assert transformers.__version__.startswith('${{ matrix.transformers-version }}'.replace('.*', ''))"
- name: Test with Pytest
run: |
pytest tests/ipex/${{ matrix.test-file }} -rsx -v