salesforce / ALBEF

Code for ALBEF: a new vision-language pre-training method
BSD 3-Clause "New" or "Revised" License
1.45k stars 193 forks source link

TypeError: add_code_sample_docstrings() got an unexpected keyword argument "tokenizer_class" #113

Open dongxinfeng1 opened 1 year ago

dongxinfeng1 commented 1 year ago

Hello, when run this code, I found a problem in "xbert.py", TypeError: add_code_sample_docstrings() got an unexpected keyword argument "tokenizer_class", could you please tell me why?

qinshuaibo commented 1 year ago

可能是transformer版本太高,试试降低一下版本

LiJunnan1992 commented 1 year ago

It is most likely due to a transformer version mismatch

charlesxu90 commented 1 year ago

Solution for python 3.7:

pip install transformers==4.8.1
JingyuanHe1222 commented 7 months ago

Solve it by updating the argument according to the following: hugging face transformer update

shyammarjit commented 4 months ago

Replacing tokenizer_class with processor_class within models/xbert.py works for me.