Skip to content

Commit

Permalink
adding the version check for transformers
Browse files Browse the repository at this point in the history
  • Loading branch information
hkwon committed Sep 11, 2024
1 parent 7a1be4d commit b3b8089
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/tests/test_transformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,11 @@ def test_transformers_wav2vec2bert(
import torch
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}")

converter = ctranslate2.converters.TransformersConverter(
model_name, load_as_float16="int8"
)
Expand Down

0 comments on commit b3b8089

Please sign in to comment.