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

ValueError with attack_dataset. #738

Open
weihan1 opened this issue May 29, 2023 · 3 comments
Open

ValueError with attack_dataset. #738

weihan1 opened this issue May 29, 2023 · 3 comments

Comments

@weihan1
Copy link

weihan1 commented May 29, 2023

Describe the bug
I am playing around with the Attacker API reference and I am running a copy-paste of the first example of textattack.attacker here: https://textattack.readthedocs.io/en/latest/api/attacker.html. The error that I am getting is

ValueError: Trying to load a model of incompatible/unknown type. '/var/folders/6x/gry3zls12tq2cn13snl3qqyc0000gn/T/tfhub_modules/42480c3c7f42bf87d36d4c58fc4374b08dae2909' contains neither 'saved_model.pb' nor 'saved_model.pbtxt'.

To Reproduce
Steps to reproduce the behavior:

  1. Copy-paste the example from https://textattack.readthedocs.io/en/latest/api/attacker.html (the one where they start by loading bert-base-uncased).
  2. Run the code and print(attacker.attack_result)

Expected behavior
The expected behaviour would be that it would run error-free.

Screenshots or Traceback
Screenshot 2023-05-29 at 5 16 42 PM

System Information (please complete the following information):

  • MacOS
  • torch ==2.0.1, transformers ==4.29.2, tensorflow==2.13.0rc0, tensorflow-hub==0.13.0, tokenizers==0.13.3
  • Textattack version 0.3.4

Additional context
I didn't have this error at all like two weeks ago. I had accidentally deleted my virtual environment, so I lost all the package versions from the time where everything worked. Hope someone can help me out, thanks!

@macksjeremy
Copy link

I'm having the same issue, also on MacOS. Are you using an M1 machine?

@weihan1
Copy link
Author

weihan1 commented Aug 22, 2023

I'm having the same issue, also on MacOS. Are you using an M1 machine?

No, I'm using an M2, but it worked for me recently when I ran it

@pipiPdesu
Copy link

This problem may be caused by tensorflow's caching mechanism, I encountered the same problem.

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

3 participants