Skip to content

migrate lcm notebook to optimum and genai path #9117

migrate lcm notebook to optimum and genai path

migrate lcm notebook to optimum and genai path #9117

Workflow file for this run

name: code_check
on:
workflow_dispatch:
pull_request:
branches:
- 'main'
- 'latest'
paths:
- '**.py'
- 'notebooks/**.ipynb'
- 'notebooks/**.md'
- 'requirements.txt'
- '.ci/*'
- '.github/workflows/*.yml'
- '.github/workflows/.env'
push:
branches:
- 'main'
- 'latest'
paths:
- '**.py'
- 'notebooks/**.ipynb'
- 'notebooks/**.md'
- 'requirements.txt'
- '.ci/*'
- '.github/workflows/*.yml'
- '.github/workflows/.env'
permissions:
contents: read
jobs:
build_codecheck:
strategy:
fail-fast: false
runs-on: ubuntu-20.04 # change cachepip step when changing this
steps:
- name: Checkout repository
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Dotenv Action
id: dotenv
uses: xom9ikk/dotenv@ac290ca23a42155a0cba1031d23afa46240116a9 # v2.3.0
with:
path: ./.github/workflows
- name: Set up Python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: "3.10" # change cachepip step when changing this
- name: Cache OpenVINO Pip Packages
id: cachepip
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: |
pipcache
key: ${{ env.PIP_CACHE_KEY }}-ubuntu-20.04-3.10
- name: Cache openvino packages
if: steps.cachepip.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip
mkdir pipcache
python -m pip install --cache-dir pipcache --no-deps openvino openvino-dev nncf
cp -r pipcache pipcache_openvino
python -m pip uninstall -y openvino openvino-dev nncf
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r .ci/dev-requirements.txt --cache-dir pipcache
python -m ipykernel install --user --name openvino_env
- name: Make pipcache directory with OpenVINO packages
# Only cache OpenVINO packages. mv works cross-platform
if: steps.cachepip.outputs.cache-hit != 'true'
run: |
mv pipcache pipcache_full
mv pipcache_openvino pipcache
- name: Pip freeze
run: |
python -m pip freeze
- name: Check install
if: always()
run: |
python check_install.py
- name: Test Jupyterlab
if: always()
run: |
jupyter lab notebooks --help
- name: Flake8
if: always()
run: |
nbqa flake8 --ignore=E124,E203,E231,E266,E402,E501,E703,F821,W503,W291,W293 --nbqa-exclude="(tensorflow-training-openvino)|(pytorch-quantization-aware-training)" notebooks
- name: Black
if: always()
run: |
black --check -l 160 .
- name: Test READMEs and requirements
if: always()
run: |
python -m pytest .ci/test_notebooks.py
- name: Test links from READMEs
if: always()
run: |
python .ci/check_links.py
- name: Test table of content and device widget
if: always()
run: |
python .ci/check_notebooks.py