Skip to content

Commit a78b2e1

Browse files
[Release-fix] Pin transformers<4.57 for release branch
Signed-off-by: Keval Morabia <[email protected]>
1 parent 146d1d9 commit a78b2e1

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

modelopt/torch/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
try:
3333
from transformers import __version__ as _transformers_version
3434

35-
if not (_Version("4.48") <= _Version(_transformers_version) < _Version("5.0")):
35+
if not (_Version("4.48") <= _Version(_transformers_version) < _Version("4.57")):
3636
_warnings.warn(
3737
f"transformers version {_transformers_version} is incompatible with nvidia-modelopt and may cause issues. "
3838
"Please install recommended version with `pip install nvidia-modelopt[hf]` if working with HF models.",

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"diffusers>=0.32.2",
6363
"huggingface_hub>=0.24.0",
6464
"peft>=0.17.0",
65-
"transformers>=4.48,<5.0", # Should match modelopt/torch/__init__.py and tox.ini
65+
"transformers>=4.48,<4.57", # Should match modelopt/torch/__init__.py and tox.ini
6666
"deepspeed>=0.9.6 ; platform_system != 'Darwin' and platform_system != 'Windows'",
6767
],
6868
# linter tools

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ deps =
2727

2828
# Should match setup.py
2929
tf_min: transformers~=4.48.0
30+
tf_latest: transformers~=4.56.0
3031
commands =
3132
python -m pytest tests/unit {env:COV_ARGS:}
3233

0 commit comments

Comments
 (0)