Releases: QData/TextAttack
Releases · QData/TextAttack
new release v0.2.14
Improvements
Bug fixing
Matching documentation in Readme.md and the files in /doc folder
add checklist
add multilingual USE
add gradient-based word importance ranking
update to a more complete API documentation
add cola constraint
add the lazy loader
new release v0.2.12
Big Improvements
- add checklist
- add multilingual USE
- add gradient-based word importance ranking
- update to a more complete API documentation
- add cola constraint
- add the lazy loader
0.2.0: 70+ pre-trained models, BERT-based attacks, input reduction, maximizing goal functions, and more!
Big Improvements
- Add tons of (over 70!) pre-trained models (#192, see Model Zoo page!)
- Data augmentation integrated into training! (#195, thanks @jakegrigsby)
- Allow for maximization goal functions (#151, thanks @uvafan )
New Attacks
- Add the Improved Genetic Algorithm (#183, thanks @sherlockyyc!)
- Add BAE and BERT-Attack attack recipes (#160)
- Add PWWS attack (#168, thanks @jakegrigsby)
- Add typo-based attack from Pruthi et al. (#191, thanks @jakegrigsby )
- Easy Data Augmentation augmentation recipe (#168, thanks @jakegrigsby)
- Add input reduction attack from Feng et al. (#161, thanks @uvafan)
Smaller Improvements
- more accurate attack recipes for BAE and TextFooler (#199)
- important fixes to model training code (#186, thanks so much @jind11!!)
- abstract classes, better string representations when printing attacks to console (#202)
- genetic algorithm improvements (#160, thanks @jinyongyoo )
- fixes to parallel attacks (#164, thanks @jinyongyoo )
- datasets to test out T5 on seq2seq attacks (#176)
Bug Fixes
`textattack` command, train models and augment CSVs from the command line, better docs, and more
Version 0.1.0 is our biggest release yet! Here's a summary of the changes:
Backwards compatibility note:
python -m textattack <args>
is renamed topython -m textattack attack <args>
. Or, better yet,textattack attack <args>
!
Big improvements
- add
textattack
command (#132) - Move all datasets to
nlp
format; temporarily remove non-NLP datasets (AGNews, English->German translation) (#134)
Smaller improvements
- Better output formatted -- show labels ("Positive", "Entailment") and confidence score (91%) in output (#142)
- add
MaxLengthModification
constraint that prevents modifications beyond tokenizer max_length (#143) - Add
pytest
tests and code formatting withblack
; run tests on Python 3.6, 3.7, 3.8 with Travis CI (#127, #136) - Update NLTK part-of-speech constraint and support part-of-speech tagging with FLAIR instead (#135)
- add
BERTScore
constrained based on "BERTScore: Evaluating Text Generation with BERT" (Zhang et al, 2019) (#146) - make logging to file optional (#145)
- Updates to
Checkpoint
class; track attack results in a worklist; attack resume fixes (#128, #141) - Silence Weights & Biases warning message when not being used (#130)
- Optionally point all cache directories to a universal cache directory,
TA_CACHE_DIR
(#150)
Bug fixes
🤗 HuggingFace integration, TextBugger, wider command-line support
big changes:
- load
transformers
models from the command-line using the--model-from-huggingface
option - load
nlp
datasets from the command-line using the--dataset-from-nlp
option - command-line support for custom attacks, models, and datasets:
--attack-from-file
,--model-from-file
,--dataset-from-file
- implement attack recipe for TextBugger attack
- add WordDeletion transformation
small changes:
- support white-box transformations via the command-line
- allow Greedy-WIR to rank things in order of ascending importance
- use fast tokenizers behind the scenes
- fix some bugs with the attack
Checkpoint
class - some abbreviated syntax (
textattack.shared.utils.get_logger() -> textattack.shared.logger
,textattack.shared.utils.get_device() -> textattack.shared.utils.device
) - substantially decrease overall
TokenizedText
memory usage
Attack checkpoints, PreTransformationConstraints, Weights & Biases, and Docs
0.0.2: Better documentation, attack checkpoints, PreTransformationConstraints, and more
- Major documentation restructure (check it out)
- Some refactoring and variable renames to make it easier to jump right in and start working with TextAttack
- Introduction of
PreTransformationConstraints
: constraints now can be applied before the transformation to prevent word modifications at certain indices. This abstraction allowed us to remove the notion ofmodified_indices
from search methods, which paves the way for us to introduce attacks that insert or delete words and phrases, as opposed to simply swapping words. - Separation of
Attack
andSearchMethod
: search methods are now a parameter to the attack instead of different subclasses ofAttack
. This syntax fits better with our framework and enforces a clearer sense of separation between the responsibilities of the attack and those of the search method. - Transformation and constraint compatibility: Constraints now ensure they're compatible with a specific transformation via a
check_compatibility
method - Goal function scores are now normalized between 0 and 1:
UntargetedClassification
andNonOverlappingOutput
now return scores between 0 and 1. - Attack Checkpoints: Attacks can now save and resume their progress. This is really useful for running long, expensive attacks.
python-m textattack
supports new checkpoint-related arguments:--checkpoint-interval
and--checkpoint-dir
- Weights & Biases: Log attack results to Weights & Biases by adding the
--enable-wandb
flag