Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TextAttack API changed #13

Closed
einderyl opened this issue Jun 25, 2021 · 4 comments
Closed

TextAttack API changed #13

einderyl opened this issue Jun 25, 2021 · 4 comments

Comments

@einderyl
Copy link

einderyl commented Jun 25, 2021

Hello, I've just started using this library and things were working for a few days, but I think there's been an API change in TextAttack which broke it (ART works OK).

When I try to load textattack, it can't find some embeddings files:

textattack: Downloading https://textattack.s3.amazonaws.com/word_embeddings\paragramcf.

[!] Failed to load counterfit/frameworks/textattack/alzotolalgo.py: Could not find word_embeddings\paragramcf on server.

textattack: Downloading https://textattack.s3.amazonaws.com/word_embeddings\paragramcf.

[!] Failed to load counterfit/frameworks/textattack/bae.py: Could not find word_embeddings\paragramcf on server.

textattack: Downloading https://textattack.s3.amazonaws.com/word_embeddings\paragramcf.

[!] Failed to load counterfit/frameworks/textattack/bert.py: Could not find word_embeddings\paragramcf on server.

textattack: Downloading https://textattack.s3.amazonaws.com/word_embeddings\paragramcf.

[!] Failed to load counterfit/frameworks/textattack/camrwr.py: Could not find word_embeddings\paragramcf on server.

textattack: Downloading https://textattack.s3.amazonaws.com/word_embeddings\paragramcf.

[!] Failed to load counterfit/frameworks/textattack/deepwordbug.py: Could not find word_embeddings\paragramcf on server.

textattack: Downloading https://textattack.s3.amazonaws.com/word_embeddings\paragramcf.

[!] Failed to load counterfit/frameworks/textattack/improved_ga.py: Could not find word_embeddings\paragramcf on server.

textattack: Downloading https://textattack.s3.amazonaws.com/word_embeddings\paragramcf.

[!] Failed to load counterfit/frameworks/textattack/InputReduction.py: Could not find word_embeddings\paragramcf on server.

textattack: Downloading https://textattack.s3.amazonaws.com/word_embeddings\paragramcf.

[!] Failed to load counterfit/frameworks/textattack/Kuleshov2017.py: Could not find word_embeddings\paragramcf on server.

textattack: Downloading https://textattack.s3.amazonaws.com/word_embeddings\paragramcf.

[!] Failed to load counterfit/frameworks/textattack/pwws.py: Could not find word_embeddings\paragramcf on server.

textattack: Downloading https://textattack.s3.amazonaws.com/word_embeddings\paragramcf.

[!] Failed to load counterfit/frameworks/textattack/textbugger.py: Could not find word_embeddings\paragramcf on server.

textattack: Downloading https://textattack.s3.amazonaws.com/word_embeddings\paragramcf.

[!] Failed to load counterfit/frameworks/textattack/textfooler.py: Could not find word_embeddings\paragramcf on server.

[+] Framework loaded successfully!

It finishes by saying the library loaded successfully, but list attacks gives

[!] No frameworks have been loaded. Try 'load '.

It was working at least 24 hours ago, so it looks like it might be the most recent TextAttack commit.

@moohax
Copy link
Contributor

moohax commented Jun 28, 2021

Will take a look and get a fix.

What OS are you on? It looks to be Windows. TextAttack can't find the path to download because the path that gets passed is incorrect, note the end word_embeddings\paragramcf. It should be https://textattack.s3.amazonaws.com/word_embeddings/paragramcf.

For Windows you need to manually download the paragramcf file and extract it into c:\users\user\.cache.

@einderyl
Copy link
Author

Yup, I'm on Windows, thanks for the embeddings fix!

@moohax
Copy link
Contributor

moohax commented Jun 29, 2021

Did that work for you? If so, I'll close the issue.

@einderyl
Copy link
Author

Yes it worked for me, but the other TextAttack issue (calling it from Counterfit using the moviereviews example) isn't fixed. I'll edit and open a new issue since they don't seem to be related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants