From 1ba3e161231f6abbe25487892b6213b8ae184285 Mon Sep 17 00:00:00 2001 From: Frank <39153483+Falanke21@users.noreply.github.com> Date: Tue, 16 May 2023 14:57:19 +0100 Subject: [PATCH] Fixed a batch_size bug in attack_args.py This change fixes the bug where "--model-batch-size" doesn't function when "--attack-recipe" argument is present. --- textattack/attack_args.py | 1 + 1 file changed, 1 insertion(+) diff --git a/textattack/attack_args.py b/textattack/attack_args.py index c33cc26b2..3521ecc8c 100644 --- a/textattack/attack_args.py +++ b/textattack/attack_args.py @@ -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: