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()
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.".
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.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 runperturbations = tl.perturb(text)
wheretext="In the operation room, the doctor comforted the athlete."
.