mirror of
https://github.com/QData/TextAttack.git
synced 2021-10-13 00:05:06 +03:00
update documentation and fix attack on empty worklist
This commit is contained in:
@@ -278,7 +278,9 @@ class Attack:
|
||||
Returns:
|
||||
results (Iterable[GoalFunctionResult]): an iterable of GoalFunctionResults of the original examples
|
||||
"""
|
||||
indices = indices or range(len(dataset))
|
||||
if indices is None:
|
||||
indices = range(len(dataset))
|
||||
|
||||
if not isinstance(indices, deque):
|
||||
indices = deque(sorted(indices))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user