Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setuptools to fix issue with Python 3.12, add Windows to OpenVINO basic test #747

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/test_openvino.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.11]
python-version: ["3.8", "3.12"]
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -46,3 +46,4 @@ jobs:
pip install openvino-nightly
python -c "from optimum.intel import OVModelForCausalLM; OVModelForCausalLM.from_pretrained('hf-internal-testing/tiny-random-gpt2', export=True, compile=False)"
optimum-cli export openvino -m hf-internal-testing/tiny-random-gpt2 gpt2-ov

21 changes: 13 additions & 8 deletions .github/workflows/test_openvino_basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ jobs:
matrix:
# Testing lower and upper bound of supported Python versions
# This also ensures that the test fails if dependencies break for Python 3.7
python-version: ["3.8", "3.11"]
transformers: ['transformers']
python-version: ["3.8", "3.12"]
optimum: ['optimum', 'git+https://github.com/huggingface/optimum.git']
os: ["ubuntu-22.04", "windows-latest"]

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

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

Expand All @@ -43,12 +43,17 @@ jobs:
# optimum or transformers to a specific version
# 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 .[tests] openvino onnx onnxruntime ${{ matrix.optimum}} ${{ matrix.transformers }}
pip install .[tests] openvino onnxruntime ${{ matrix.optimum}}

- name: Pip freeze
- name: Pip freeze
run: pip freeze

- name: Test with Pytest
run: |
pytest tests/openvino/test_modeling_basic.py
RUN_SLOW=1 pytest tests/openvino/test_modeling.py -s -m "run_slow" --durations=0

- name: Slow tests
run: |
pytest tests/openvino/test_modeling.py -s -m "run_slow" --durations=0
env:
RUN_SLOW: 1
2 changes: 1 addition & 1 deletion .github/workflows/test_openvino_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.11"]
python-version: ["3.8", "3.12"]

runs-on: ubuntu-22.04

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_openvino_notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.11"]
python-version: ["3.8", "3.12"]

runs-on: ubuntu-22.04

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"optimum~=1.20",
"datasets>=1.4.0",
"sentencepiece",
"setuptools",
"scipy",
"onnx",
]
Expand All @@ -49,7 +50,6 @@
"rjieba",
"timm",
"invisible-watermark>=0.2.0",
"auto-gptq",
"transformers_stream_generator",
"einops",
"tiktoken",
Expand Down
Loading