huggingface / transformers

🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX.
https://huggingface.co/transformers
Apache License 2.0
131.67k stars 26.22k forks source link

snapshot_download() got an unexpected keyword argument 'allow_regex' #15393

Closed gnmarten closed 2 years ago

gnmarten commented 2 years ago

Environment info

patrickvonplaten commented 2 years ago

Hey @gnmarten,

Could you copy-paste this command and state your` output here:

python -c "import huggingface_hub; print(huggingface_hub.__version__)"

If your version is lower than 0.4.0 it would be nice if you could upgrade huggingface_hub

gnmarten commented 2 years ago

yes, it was <0.4.0, and after upgrade the download works (with remark "Loading the LM will be faster if you build a binary file.")

Thanks a lot for the fast reaction

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

BaiMeiyingxue commented 1 year ago

Hi everyone, My huggingface_hub is 0.11.1, and the error

   TypeError: snapshot_download() got an unexpected keyword argument 'local_dir_use_symlinks'
   snapshot_download() got an unexpected keyword argument 'local_dir_use_symlinks'
   snapshot_download() got an unexpected keyword argument 'local_dir'

which version should I update to?

patrickvonplaten commented 1 year ago

Could you upgrade huggingface_hub to the newest version?

MartinGrashei commented 1 year ago

Hi everyone,

I got the same error:

/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_validators.py in _inner_fn(*args, *kwargs) 116 kwargs = smoothly_deprecate_use_auth_token(fn_name=fn.name, has_token=has_token, kwargs=kwargs) 117 --> 118 return fn(args, **kwargs) 119 120 return _inner_fn # type: ignore

TypeError: snapshot_download() got an unexpected keyword argument 'allow_regex'

WIth huggingface_hub being upgraded to the latest version: 0.16.4 I'm using original version of the colab-tutorial "Boosting Wav2Vec2 with n-grams" (https://huggingface.co/blog/wav2vec2-with-ngram).

Update 03.09.2023: Problem was solved actually by downgrading hugging_face and loading it with a huggingface_hub version of similar age: !pip install huggingface_hub==0.5.1

vin136 commented 5 months ago

I'm getting the same error:

return fn(*args, **kwargs)
       ^^^^^^^^^^^^^^^^^^^

TypeError: snapshot_download() got an unexpected keyword argument 'ignore_files'

I'm on the latest version too