TextAttack icon indicating copy to clipboard operation
TextAttack copied to clipboard

TextAttack 🐙 is a Python framework for adversarial attacks, data augmentation, and model training in NLP https://textattack.readthedocs.io/en/master/

Results 86 TextAttack issues
Sort by recently updated
recently updated
newest added

Dear sir, I meet an issue when I was used CheckListAugmenter which is writed on Title. **Here is my code.** import torch import textattack augmenter = textattack.augmentation.CheckListAugmenter() a = 'What...

**Describe the bug** IndexError when use WordSwapQWERTY to augment data **To Reproduce** The following code would reproduce the issue. ```python from textattack.transformations.word_swaps import WordSwapQWERTY from textattack.constraints.pre_transformation import RepeatModification, StopwordModification from...

bug

Hello, I'm tried to install **textattack** using pip package and also through the source option and I'm always getting the same error message. I've already **tried to update** pip, but...

invalid
setup issues
Windows

Hi. I am new to using GPU. I have used the Textattack library earlier for one of my projects using Sklearn and Keras models. For that I created the customModelWrappers...

question

**To Reproduce** Run following code ... ``` from textattack.augmentation import Augmenter from textattack.transformations import WordSwapEmbedding from textattack.constraints.semantics import WordEmbeddingDistance from textattack.constraints.grammaticality import PartOfSpeech from textattack.constraints.pre_transformation import RepeatModification, StopwordModification from textattack.shared...

When I used the model trained by the A2T attack to evaluate the robustness, the code used the other models to generate 1000 samples for evaluation. ![1712895714705](https://github.com/QData/TextAttack/assets/99568990/a047ba0f-c547-4167-8b7a-32552a442d69) Some of them,...

**Describe the bug** the return of Attacked_text.word_diff_ratio is 1 all the time **To Reproduce** Steps to reproduce the behavior: 1. Run following command `textattack ...` 2. Run following code ......

I run this `textattack attack --recipe textfooler --model bert-base-uncased-stsb --num-examples 100` and in this function run error ![image](https://github.com/QData/TextAttack/assets/82364837/6acc11dd-f817-4bc5-9e2e-ec54f85973d2) ![image](https://github.com/QData/TextAttack/assets/82364837/9c1443a6-f36e-4f98-b405-af1e5fc48129)

question

**Describe the bug** HuggingFaceDataset doesn't shuffle the dataset either when passing shuffle=True and also by calling the shuffle() method **To Reproduce** Steps to reproduce the behavior: 1. Run this code:...

bug

…cedAttackMetric # What does this PR do? Handles empty input_ids when calculating complexity, which gave rise to RuntimeError when using "gpt2" as tokenizer. Allows for adding metrics to AdvancedAttackMetric with...