Skip to content

Commit

Permalink
Fixed a batch_size bug in attack_args.py
Browse files Browse the repository at this point in the history
This change fixes the bug where "--model-batch-size" doesn't function when "--attack-recipe" argument is present.
  • Loading branch information
Falanke21 authored May 16, 2023
1 parent edbcb83 commit 1ba3e16
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions textattack/attack_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,7 @@ def _create_attack_from_args(cls, args, model_wrapper):
if args.query_budget:
recipe.goal_function.query_budget = args.query_budget
recipe.goal_function.model_cache_size = args.model_cache_size
recipe.goal_function.batch_size = args.model_batch_size
recipe.constraint_cache_size = args.constraint_cache_size
return recipe
elif args.attack_from_file:
Expand Down

0 comments on commit 1ba3e16

Please sign in to comment.