Remove datasets as required dependency #491
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 - Notebooks Test | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "14 3 * * 1" # run weekly: every Monday at 3:14 | |
push: | |
branches: | |
- v*-release | |
pull_request: | |
paths: | |
- "notebooks/openvino/*" | |
- ".github/workflows/test_openvino_notebooks.yml" | |
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: | |
test_file: [ | |
"optimum_openvino_inference.ipynb", | |
"question_answering_quantization.ipynb", | |
"sentence_transformer_quantization.ipynb", | |
"vision_language_quantization.ipynb", | |
# "stable_diffusion_hybrid_quantization.ipynb", TODO: update and ran on a powerful cpu | |
] | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y ffmpeg | |
- name: Install dependencies | |
run: | | |
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu | |
pip install -r notebooks/openvino/requirements.txt | |
pip install .[tests,openvino] nbval | |
- name: Change some variables | |
run: | | |
sed -i 's/NUM_TRAIN_ITEMS = 600/NUM_TRAIN_ITEMS = 2/' notebooks/openvino/question_answering_quantization.ipynb | |
- name: Test with Pytest | |
run: | | |
pytest --nbval-lax -vvvv notebooks/openvino/${{ matrix.test_file }} |