huggingface / transformers

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

ImportError: cannot import name 'logging' from 'huggingface_hub' #31492

Open zyc1128 opened 2 weeks ago

zyc1128 commented 2 weeks ago

System Info

from transformers import AutoTokenizer,AutoModelForCausalLM all dependencies have the latest versions

Who can help?

No response

Information

Tasks

Reproduction

1

Expected behavior

1

amyeroberts commented 2 weeks ago

Hi @zyc1128, thanks for opening an issue!

I'm unable to replicate this problem and can run from transformers import AutoTokenizer,AutoModelForCausalLM without issue.

all dependencies have the latest versions

This is underspecified. For example, is "latest" nightly builds or stable release? Which dependencies (it depends how you are using the library). The best way to get this information is by running transformers-cli env in the terminal.

Could you share a full traceback of the error?

RUFFY-369 commented 2 weeks ago

Hi @zyc1128 please try upgrading huggingface-hub with pip install --upgrade huggingface-hub and also restart your kernel or session after doing so