Skip to content

Commit e126106

Browse files
authored
Fix ML presubmits. (#38289)
1 parent a375d6c commit e126106

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

sdks/python/setup.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,19 @@ def cythonize(*args, **kwargs):
185185
# tensorflow transitive dep, lower versions not compatible with Python3.10+
186186
'absl-py>=0.12.0',
187187
'tensorflow-hub',
188+
# tokenizers 0.23.0rc0 renamed the PyO3 kwarg of
189+
# processors.RobertaProcessing (and BertProcessing) from `cls` to
190+
# `cls_token` -- the rename was a drive-by inside huggingface/tokenizers
191+
# https://github.com/huggingface/tokenizers/pull/1928.
192+
# transformers' slow CLIP tokenizer still calls
193+
# `processors.RobertaProcessing(sep=..., cls=..., ...)` at
194+
# transformers/models/clip/tokenization_clip.py, so model load fails with
195+
# "RobertaProcessing.__new__() got an unexpected keyword argument 'cls'".
196+
# The ml tox envs run with pip_pre=True (tox.ini:32), so even though no
197+
# 0.23 stable has shipped yet, the rc gets resolved.
198+
# Drop this cap once transformers updates the CLIP call site to
199+
# `cls_token=` or tokenizers reinstates `cls=` as a deprecation alias.
200+
'tokenizers<0.23',
188201
'torch',
189202
'transformers',
190203
]

0 commit comments

Comments
 (0)