allenai / allenai/tailor

AttributeError: No huggingface_hub attribute hf_api error

未關閉
#83 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
bug
主要語言
Python
星號
31
分支
5
PR 合併指標
30 天內沒有已合併 PR

描述

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

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。