reddy-lab-code-research/CodeAttack

Unresolved dependency in codeattack.py, "from textfooler.utils_textfooler import get_var, get_sim_predictor"

Opened this issue · 5 comments

Thank you for your interesting work and open source code!
I am trying to replicate the package, but it seems that the dependency "from textfooler.utils_textfooler import get_var, get_sim_predictor" in codeattack.py doest not exist in requirement.yml, how to install it?
By the way, I tried to look for textfooler.utils_textfooler in https://github.com/jind11/TextFooler, but did not find anything related.

Looking forward to your reply,
Sincerely

The same issue for

from textfooler.get_substitutes_textfooler import get_substitutes_textfooler
from textfooler.get_substitutes_textfooler import get_similarity_score 

in attack.py

Thank you for your interesting work and open source code! I am trying to replicate the package, but it seems that the dependency "from textfooler.utils_textfooler import get_var, get_sim_predictor" in codeattack.py doest not exist in requirement.yml, how to install it? By the way, I tried to look for textfooler.utils_textfooler in https://github.com/jind11/TextFooler, but did not find anything related.

Looking forward to your reply, Sincerely

Did you mange to find a solution for the problem because I have the same issue?

Unfortunately not, I temporatily comment out these lines and only run CodeAttack algorithm they provided. Btw, I found that CodeAttack does not gurantee the generated code mutants are syntactically correct.

YuJieF commented

Thank you for your interesting work and open source code! I am trying to replicate the package, but it seems that the dependency "from textfooler.utils_textfooler import get_var, get_sim_predictor" in codeattack.py doest not exist in requirement.yml, how to install it? By the way, I tried to look for textfooler.utils_textfooler in https://github.com/jind11/TextFooler, but did not find anything related.
Looking forward to your reply, Sincerely

Did you mange to find a solution for the problem because I have the same issue?

I meet the same question. Did you find a solution now?

Unfortunately not, I temporatily comment out these lines and only run CodeAttack algorithm they provided. Btw, I found that CodeAttack does not gurantee the generated code mutants are syntactically correct.
How can I find the fine-tuned pretrain model? I found this project lacks of many necessary file.