TextAttack
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/
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...
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...
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...
**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.  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  
**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:...
…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...