allenai / allenai/tailor

AttributeError: No huggingface_hub attribute hf_api error

Aperta
#83 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug
Lingua principale
Python
Stelle
31
Fork
5
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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."`.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.