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

attempting to fix fast alznatot

This commit is contained in:
Jack Morris
2020-07-10 09:27:33 -04:00
parent 641cbe7b61
commit f875f65eed
2 changed files with 5 additions and 2 deletions

View File

@@ -38,7 +38,7 @@ class Attack:
constraints=[],
transformation=None,
search_method=None,
constraint_cache_size=2 ** 18,
constraint_cache_size=2 ** 20,
):
""" Initialize an attack object. Attacks can be run multiple times. """
self.goal_function = goal_function
@@ -150,7 +150,7 @@ class Attack:
):
"""
Filters a list of potential transformed texts based on ``self.constraints``\.
Checks cache first.
Utilizes an LRU cache to attempt to avoid recomputing common transformations.
Args:
transformed_texts: A list of candidate transformed ``AttackedText``\s to filter.