You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The command-line code for generating adversarial examples using the PSOZang recipe results in "KeyError: 'pos'" error the moment it wants to generate the adversarial examples. The same method works for other recipes well.
To Reproduce
Steps to reproduce the behavior:
Run a command like the following, for example for a given model and dataset (it has the same error when tried on other datasets and models as well, also for different num-exampless, and the only way to prevent the error is to use a different recipe): textattack attack --recipe pso --num-examples 470 --model ./outputs/2023-06-19-15-18-19-224515/best_model/ --dataset-from-huggingface rotten_tomatoes --dataset-split test
See error KeyError: 'pos'
Expected behavior
Adversarial examples should be generated, as it is the case for other recipes (e.g. textfooler).
Seems like an update in the flair dependency! Can you try to downgrade flair for now and see if it works? Long-term we should fix to a certain version of flair or update our usage to match the most recent version.
I am running into the same issue as OP. I downgraded to flair==0.12.1 to no avail. I also tried flair==0.12.0, and the issue still persists. I can't downgrade any further without running into dependency issues with other packages. Any other possible reasons for this issue?
Describe the bug
The command-line code for generating adversarial examples using the PSOZang recipe results in "KeyError: 'pos'" error the moment it wants to generate the adversarial examples. The same method works for other recipes well.
To Reproduce
Steps to reproduce the behavior:
num-examples
s, and the only way to prevent the error is to use a different recipe):textattack attack --recipe pso --num-examples 470 --model ./outputs/2023-06-19-15-18-19-224515/best_model/ --dataset-from-huggingface rotten_tomatoes --dataset-split test
KeyError: 'pos'
Expected behavior
Adversarial examples should be generated, as it is the case for other recipes (e.g.
textfooler
).Screenshots or Traceback
System Information:
The text was updated successfully, but these errors were encountered: