Skip to content

Attack checkpoints, PreTransformationConstraints, Weights & Biases, and Docs

Compare
Choose a tag to compare
@jxmorris12 jxmorris12 released this 21 May 21:06
· 1971 commits to master since this release
5f0d828

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 of modified_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 and SearchMethod: search methods are now a parameter to the attack instead of different subclasses of Attack. 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 and NonOverlappingOutput 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