[bugfix]Return the Transformer version from 4.57.2 to 4.57.1 (#4423)
### What this PR does / why we need it?
This PR pins the transformers dependency to 4.57.1.
Reason: CI tests (specifically test_completion_with_prompt_embeds.py)
are failing with an AttributeError: 'dict' object has no attribute
'model_type' when using newer versions of transformers.
The issue stems from a bug in tokenization_utils_base.py where the code
attempts to access the model_type field of a configuration dictionary
(_config) using dot notation (_config.model_type) instead of dictionary
key lookup (_config["model_type"] or _config.get("model_type")). This
occurs in the logic block checking for transformers_version <= 4.57.2.
Pinning the version to 4.57.1 bypasses this buggy code path and restores
CI stability.
Error Traceback:
``` shell
/usr/local/python3.11.13/lib/python3.11/site-packages/transformers/tokenization_utils_base.py:2419:
if _is_local and _config.model_type not in [
E AttributeError: 'dict' object has no attribute 'model_type'
```
- vLLM main:
2918c1b49c
Signed-off-by: MrZ20 <2609716663@qq.com>
This commit is contained in:
@@ -14,6 +14,7 @@ requires = [
|
||||
"pandas-stubs",
|
||||
"setuptools>=64",
|
||||
"setuptools-scm>=8",
|
||||
"transformers<=4.57.1",
|
||||
"torch-npu==2.7.1",
|
||||
"torch==2.7.1",
|
||||
"torchvision",
|
||||
|
||||
@@ -28,3 +28,5 @@ numba
|
||||
#--pre
|
||||
#--extra-index-url https://mirrors.huaweicloud.com/ascend/repos/pypi
|
||||
torch-npu==2.7.1
|
||||
|
||||
transformers<=4.57.1
|
||||
|
||||
Reference in New Issue
Block a user