Skip to content

Commit

Permalink
Merge pull request #602 from zjzh/master
Browse files Browse the repository at this point in the history
Update checkpoint.py
  • Loading branch information
qiyanjun committed Feb 20, 2022
2 parents 1cc6509 + 1d06c65 commit f0f0779
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions textattack/shared/checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,8 @@ def _verify(self):
self.worklist
), "Recorded number of remaining attacks and size of worklist are different."

results_set = set()
for result in self.attack_log_manager.results:
results_set.add(result.original_text)

results_set = {result.original_text
for result in self.attack_log_manager.results}
assert (
len(results_set) == self.results_count
), "Duplicate `AttackResults` found."

0 comments on commit f0f0779

Please sign in to comment.