From 09d080f5d57c5ba72951bb7acd9438f5e7664864 Mon Sep 17 00:00:00 2001 From: Helena Kloosterman Date: Mon, 16 Dec 2024 11:21:36 +0100 Subject: [PATCH] Update dependencies for older transformers (#1072) --- .github/workflows/test_openvino.yml | 5 +++-- .github/workflows/test_openvino_slow.yml | 4 ++-- tests/openvino/test_quantization.py | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test_openvino.yml b/.github/workflows/test_openvino.yml index 7583c5107..db35324a9 100644 --- a/.github/workflows/test_openvino.yml +++ b/.github/workflows/test_openvino.yml @@ -1,6 +1,7 @@ name: OpenVINO - Test on: + workflow_dispatch: push: branches: - main @@ -46,9 +47,9 @@ jobs: pip install .[openvino,openvino-tokenizers,diffusers,tests] transformers[testing] - if: ${{ matrix.transformers-version != 'latest' }} - name: Downgrade Transformers and Accelerate + name: Install specific dependencies and versions required for older transformers run: | - pip install transformers==${{ matrix.transformers-version }} accelerate==0.* peft==0.13.* + pip install transformers==${{ matrix.transformers-version }} accelerate==0.* peft==0.13.* diffusers==0.30.* transformers_stream_generator - if: ${{ matrix.test-pattern == '*modeling*' }} name: Uninstall NNCF diff --git a/.github/workflows/test_openvino_slow.yml b/.github/workflows/test_openvino_slow.yml index 9ad5ef269..8c3d9b2d3 100644 --- a/.github/workflows/test_openvino_slow.yml +++ b/.github/workflows/test_openvino_slow.yml @@ -46,8 +46,8 @@ jobs: pip uninstall -y nncf - if: ${{ matrix.transformers-version != 'latest' }} - name: Downgrade Transformers and Accelerate - run: pip install transformers==${{ matrix.transformers-version }} accelerate==0.* peft==0.13.* + name: Install specific dependencies and versions required for older transformers + run: pip install transformers==${{ matrix.transformers-version }} accelerate==0.* peft==0.13.*, diffusers==0.30.* transformers_stream_generator - name: Pip freeze run: pip freeze diff --git a/tests/openvino/test_quantization.py b/tests/openvino/test_quantization.py index 1fd58646e..d02dea3f1 100644 --- a/tests/openvino/test_quantization.py +++ b/tests/openvino/test_quantization.py @@ -106,8 +106,8 @@ class OVQuantizerTest(unittest.TestCase): weight_only=False, smooth_quant_alpha=0.95, ), - (14, 22, 21) if is_transformers_version("<=", "4.36.0") else (14, 22, 25), - (14, 21, 17) if is_transformers_version("<=", "4.36.0") else (14, 22, 18), + (14, 22, 21) if is_transformers_version("<=", "4.42.4") else (14, 22, 25), + (14, 21, 17) if is_transformers_version("<=", "4.42.4") else (14, 22, 18), ), ]