1
0
mirror of https://github.com/QData/TextAttack.git synced 2021-10-13 00:05:06 +03:00

discussed fixes

This commit is contained in:
uvafan
2020-06-05 18:22:48 -04:00
parent d24bd67c0b
commit 298518afca
8 changed files with 49 additions and 48 deletions

View File

@@ -174,7 +174,7 @@ class Attack:
for text, ground_truth_output in dataset:
tokenized_text = TokenizedText(text, self.tokenizer)
self.goal_function.num_queries = 0
goal_function_result = self.goal_function.get_result(tokenized_text, ground_truth_output)
goal_function_result, _ = self.goal_function.get_result(tokenized_text, ground_truth_output)
# We can skip examples for which the goal is already succeeded,
# unless `attack_skippable_examples` is True.
if (not attack_skippable_examples) and (goal_function_result.succeeded):