jind11 / TextFooler

A Model for Natural Language Attack on Text Classification and Inference
MIT License
485 stars 79 forks source link

version #33

Closed yulu0724 closed 3 years ago

yulu0724 commented 3 years ago

Hi, could you please show your python/pytorch/cuda version? I always have problems installing the requirements. Thanks!

yulu0724 commented 3 years ago

When I use python3, I had problem installing pattern. When I changed to python2.7. I had some other issues saying it need a python3 version....

jind11 commented 3 years ago

I used python 3.6, cuda 9.0/10.0, and pytorch 1.2.

jind11 commented 3 years ago

Could you post your error message so that I can better help with?

yulu0724 commented 3 years ago

Thanks for the reply.

Traceback (most recent call last): File "attack_classification.py", line 6, in import criteria File "/home/lu.yu/TextFooler/criteria.py", line 4, in from pattern.en import conjugate, lemma, lexeme, PRESENT, SG, PL, PAST, PROGRESSIVE ModuleNotFoundError: No module named 'pattern'

When I tried to install the pattern. I have the issues as follows:

UnsatisfiableError: The following specifications were found to be in conflict:

yulu0724 commented 3 years ago

The problem is solved after I changed the python version to 3.6. Thanks

jind11 commented 3 years ago

Ok, I am glad you have solved the problem. I am also surprised that the python 3.7 is not compatible here. Thanks for pointing this out.