allenai / tailor

Apache License 2.0
31 stars 4 forks source link

AttributeError: No huggingface_hub attribute hf_api error #83

Open preethiseshadri518 opened 2 years ago

preethiseshadri518 commented 2 years ago

Note: this issue seems to be resolved with updating the transformers version in requirements.txt, but a new error pops up when trying to perturb using Tailor. See EDIT below.


I have installed Tailor using pip: pip install tailor_nlp. I used a new Conda environment for installation with Python 3.7.

However, I get the following error when trying to import Tailor and initiate a wrapper: AttributeError: No huggingface_hub attribute hf_api. I'm not sure what to change. I am using transformers version 4.4.2, huggingface-hub version 0.8.1, and datasets version 1.15.1.

# initiate a wrapper.
from tailor import Tailor
tl = Tailor()
Screen Shot 2022-07-26 at 12 07 47 PM

EDIT: I was able to fix this issue by changing the requirements to be transformers<=4.20.1. However, I now get another error TypeError: Can't convert {'output_ids': [[[0, 86, 8, 2986, 562, 6, 8, 2472, 3, 31, 7, 784, 5365, 308, 4090, 10, 56, 908, 784, 16174, 279, 10, 2115, 908, 8, 17893, 5, 1]]]} to Sequence when trying to run perturbations = tl.perturb(text) where text="In the operation room, the doctor comforted the athlete.".

tanay2001 commented 1 year ago

any updates regarding this bug? @alexisjihyeross @preethiseshadri518

youyouisme commented 4 months ago

Hello, facing the same error, did you solve this?