Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions docs/api/transformations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,3 @@ Composite Transformation
.. autoclass:: textattack.transformations.CompositeTransformation
:members:



.. toctree::
:maxdepth: 6

textattack.transformations.sentence_transformations
textattack.transformations.word_insertions
textattack.transformations.word_merges
textattack.transformations.word_swaps

4 changes: 3 additions & 1 deletion textattack/attack_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,10 @@ class AttackArgs:
The number of successful adversarial examples we want. This is different from :obj:`num_examples`
as :obj:`num_examples` only cares about attacking `N` samples while :obj:`num_successful_examples` aims to keep attacking
until we have `N` successful cases.

.. note::
If set, this argument overrides `num_examples` argument.
num_examples_offset (:obj: `int`, `optional`, defaults to :obj:`0`):
num_examples_offset (:obj:`int`, `optional`, defaults to :obj:`0`):
The offset index to start at in the dataset.
attack_n (:obj:`bool`, `optional`, defaults to :obj:`False`):
Whether to run attack until total of `N` examples have been attacked (and not skipped).
Expand All @@ -167,6 +168,7 @@ class AttackArgs:
query_budget (:obj:`int`, `optional`, defaults to :obj:`None`):
The maximum number of model queries allowed per example attacked.
If not set, we use the query budget set in the :class:`~textattack.goal_functions.GoalFunction` object (which by default is :obj:`float("inf")`).

.. note::
Setting this overwrites the query budget set in :class:`~textattack.goal_functions.GoalFunction` object.
checkpoint_interval (:obj:`int`, `optional`, defaults to :obj:`None`):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class LearningToWriteLanguageModel(LanguageModelConstraint):

https://github.com/windweller/l2w

Reused by Jia et al., 2019, as a substitution for the Google
Reused by Jia et al., 2019, as a substitution for the Google
1-billion words language model (in a revised version the attack of
Alzantot et al., 2018).

Expand Down
2 changes: 1 addition & 1 deletion textattack/goal_function_results/custom/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Custom Goal Function Result package:
=============================
====================================

Custom goal function results

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""

NamedEntityRecognitionoalFunctionResult Class
====================================
NamedEntityRecognitionGoalFunctionResult Class
===============================================

logit sum goal function Result
named entity recognition goal function Result

"""

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""

TargetedBonusGoalFunctionResult Class
====================================
=====================================

targeted bonus goal function Result

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""

TargetedStrictGoalFunctionResult Class
====================================
======================================

targeted strict goal function Result

Expand Down
2 changes: 1 addition & 1 deletion textattack/loggers/json_summary_logger.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Attack Summary Results Logs to Json
========================
===================================
"""

import json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class BackTranscription(SentenceTransformation):

>>> augmenter.augment(s)

You can find more about the back transcription method in the following paper:
You can find more about the back transcription method in the following paper::

@inproceedings{kubis-etal-2023-back,
title = "Back Transcription as a Method for Evaluating Robustness of Natural Language Understanding Models to Speech Recognition Errors",
Expand Down
Loading