Skip to content

Commit

Permalink
Update dependencies for older transformers (#1072)
Browse files Browse the repository at this point in the history
  • Loading branch information
helena-intel authored Dec 16, 2024
1 parent 32ceae1 commit 09d080f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/test_openvino.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: OpenVINO - Test

on:
workflow_dispatch:
push:
branches:
- main
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_openvino_slow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/openvino/test_quantization.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
),
]

Expand Down

0 comments on commit 09d080f

Please sign in to comment.