textattack.commands package
TextAttack commands Package
AttackCommand class
- class textattack.commands.attack_command.AttackCommand[source]
Bases:
textattack.commands.textattack_command.TextAttackCommand
The TextAttack attack module:
A command line parser to run an attack from user specifications.
AttackResumeCommand class
- class textattack.commands.attack_resume_command.AttackResumeCommand[source]
Bases:
textattack.commands.textattack_command.TextAttackCommand
The TextAttack attack resume recipe module:
A command line parser to resume a checkpointed attack from user specifications.
AugmentCommand class
- class textattack.commands.augment_command.AugmentCommand[source]
Bases:
textattack.commands.textattack_command.TextAttackCommand
The TextAttack attack module:
A command line parser to run data augmentation from user specifications.
BenchmarkRecipeCommand class
- class textattack.commands.benchmark_recipe_command.BenchmarkRecipeCommand[source]
Bases:
textattack.commands.textattack_command.TextAttackCommand
The TextAttack benchmark recipe module:
A command line parser to benchmark a recipe from user specifications.
EvalModelCommand class
- class textattack.commands.eval_model_command.EvalModelCommand[source]
Bases:
textattack.commands.textattack_command.TextAttackCommand
The TextAttack model benchmarking module:
A command line parser to evaluatate a model from user specifications.
- class textattack.commands.eval_model_command.ModelEvalArgs(dataset_by_model: str = None, dataset_from_huggingface: str = None, dataset_from_file: str = None, dataset_split: str = None, filter_by_labels: list = None, model: str = None, model_from_file: str = None, model_from_huggingface: str = None, random_seed: int = 765, batch_size: int = 32, num_examples: int = 5, num_examples_offset: int = 0)[source]
Bases:
textattack.model_args.ModelArgs
,textattack.dataset_args.DatasetArgs
- batch_size: int = 32
- num_examples: int = 5
- num_examples_offset: int = 0
- random_seed: int = 765
ListThingsCommand class
- class textattack.commands.list_things_command.ListThingsCommand[source]
Bases:
textattack.commands.textattack_command.TextAttackCommand
The list module:
List default things in textattack.
PeekDatasetCommand class
TextAttack CLI main class
TrainModelCommand class
- class textattack.commands.train_model_command.TrainModelCommand[source]
Bases:
textattack.commands.textattack_command.TextAttackCommand
The TextAttack train module:
A command line parser to train a model from user specifications.