Skip to content

Commit

Permalink
adding the version check for transformers2
Browse files Browse the repository at this point in the history
  • Loading branch information
hkwon committed Sep 11, 2024
1 parent 4da2954 commit 03bd404
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions python/tests/test_transformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,16 @@ def test_transformers_wav2vec2(
class TestWav2Vec2Bert:
@classmethod
def teardown_class(cls):
import transformers

required_version = "4.41.0"
current_version = transformers.__version__
if current_version < required_version:
pytest.skip(
f"Transformers version must be >= {required_version},"
" but found {current_version}"
)

clear_transformers_cache_in_ci()

@test_utils.only_on_linux
Expand Down

0 comments on commit 03bd404

Please sign in to comment.