yaoxingcheng / TLM

ICML'2022: NLP From Scratch Without Large-Scale Pretraining: A Simple and Efficient Framework
MIT License
256 stars 21 forks source link

“AttributeError: No huggingface_hub attribute hf_api” #20

Open Smurflyiaa opened 1 year ago

Smurflyiaa commented 1 year ago

Hi, Xingcheng! When I tried to run "bash example_scripts/evaluate.sh" on Python 3.9.15, I've got an error of “AttributeError: No huggingface_hub attribute hf_api”. I was wondering if this is caused by a version error of the related packages. Then I updated both the versions of transformers(4.25.1) and huggingface_hub(0.11.1), but the problem was still unresolved. Could you help me with this problem? Thank you!

yaoxingcheng commented 11 months ago

Sorry for very late reply (I've been busy since last year), hope I could still be of help. huggingface_hub got rid of hf_api long ago, so updating wouldn't work. I suggest align the dependencies with all the versions listed in the requirement.txt, with a lower version of python (like 3.7), and use an earlier version of huggingface-hub (e.g., <=0.8.1)