Skip to content

Commit

Permalink
Add a separate ov nightly GHA workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nikita-savelyevv committed Nov 4, 2024
1 parent 74d2161 commit f472b59
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 21 deletions.
23 changes: 2 additions & 21 deletions .github/workflows/test_openvino_basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,6 @@ jobs:
python-version: ["3.9", "3.12"]
os: ["ubuntu-22.04", "windows-latest"]
transformers-version: ["latest"]
openvino: ["openvino openvino-tokenizers"]
nncf: ["nncf"]
include:
- python-version: "3.12"
os: "ubuntu-22.04"
transformers-version: "4.36.0"
openvino: "openvino openvino-tokenizers"
nncf: "nncf"
- python-version: "3.12"
os: "ubuntu-22.04"
transformers-version: "latest"
openvino: "--pre -U openvino openvino-tokenizers --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly"
nncf: "nncf"
- python-version: "3.12"
os: "ubuntu-22.04"
transformers-version: "latest"
openvino: "--pre -U openvino openvino-tokenizers --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly"
nncf: "git+https://github.com/openvinotoolkit/nncf.git"

runs-on: ${{ matrix.os }}

Expand All @@ -64,8 +46,7 @@ jobs:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
# Install openvino manually to prevent dependency conflicts when .[openvino] pins
# optimum or transformers to a specific version
pip install ${{ matrix.openvino }}
pip install .[tests]
pip install .[tests] openvino
- name: Pip freeze
run: pip freeze
Expand All @@ -76,7 +57,7 @@ jobs:
- name: Slow tests
run: |
pip install ${{ matrix.nncf }}
pip install nncf
pytest tests/openvino -s -m "run_slow" --durations=0
env:
RUN_SLOW: 1
Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/test_openvino_full.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: OpenVINO - Basic Test

on:
workflow_dispatch:
schedule:
- cron: "41 3 * * *" # run every day at 3:41
push:
branches:
- v*-release
pull_request:
types: [opened, synchronize, reopened, labeled]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
if: ${{ (github.event_name == 'workflow_dispatch') || (github.event_name == 'schedule') || contains( github.event.pull_request.labels.*.name, 'openvino-test') }}
strategy:
fail-fast: false
matrix:
python-version: ["3.12"]
os: ["ubuntu-22.04"]
transformers-version: ["latest"]
openvino: ["openvino openvino-tokenizers"]
nncf: ["nncf"]
include:
- openvino: "openvino openvino-tokenizers"
nncf: "nncf"
- openvino: "--pre -U openvino openvino-tokenizers --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly"
nncf: "nncf"
- openvino: "--pre -U openvino openvino-tokenizers --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly"
nncf: "git+https://github.com/openvinotoolkit/nncf.git"

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install lowest compatible transformers version
if: ${{ matrix.transformers-version != 'latest' }}
run: pip install transformers==${{ matrix.transformers-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
# Install PyTorch CPU to prevent unnecessary downloading/installing of CUDA packages
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip install ${{ matrix.openvino }}
pip install .[tests]
- name: Pip freeze
run: pip freeze

- name: OpenVINO tests
run: |
pip install ${{ matrix.nncf }}
pytest tests/openvino -s --durations=0
env:
RUN_SLOW: 1
HF_HUB_READ_TOKEN: ${{ secrets.HF_HUB_READ_TOKEN }}

0 comments on commit f472b59

Please sign in to comment.