openai / gpt-2

Code for the paper "Language Models are Unsupervised Multitask Learners"
https://openai.com/blog/better-language-models/
Other
22.57k stars 5.53k forks source link

TypeError: add_code_sample_docstrings() got an unexpected keyword argument 'tokenizer_class' #299

Open rainbow979 opened 3 years ago

wydwww commented 2 years ago

Because you're using an old version of the code but a new version of the transformers library, which removes this docsting in https://github.com/huggingface/transformers/commit/f5af87361718be29a1d3ddb2d8ef23f85b1c70c3 A solution is to roll back to an old version like v4.11 or update your code.

remzicam commented 2 years ago

just change the variable name tokenizer_class to processor_class. That works for me.

PS: If you click the link @wydwww suggested, you can see it there.