mirror of
https://github.com/QData/TextAttack.git
synced 2021-10-13 00:05:06 +03:00
fix query count for GoalFunctionResult returned by SearchMethod._perform_search
This commit is contained in:
@@ -108,6 +108,8 @@ class Attack:
|
||||
|
||||
# Give search method access to functions for getting transformations and evaluating them
|
||||
self.search_method.get_transformations = self.get_transformations
|
||||
# Give search method access to self.goal_function for model query count, etc.
|
||||
self.search_method.goal_function = self.goal_function
|
||||
# The search method only needs access to the first argument. The second is only used
|
||||
# by the attack class when checking whether to skip the sample
|
||||
self.search_method.get_goal_results = (
|
||||
|
||||
Reference in New Issue
Block a user