add tqdm
Browse files
ecqa.py
CHANGED
@@ -17,6 +17,7 @@ import evaluate
|
|
17 |
import datasets
|
18 |
import re
|
19 |
import string
|
|
|
20 |
from collections import Counter
|
21 |
|
22 |
# TODO: Add BibTeX citation
|
@@ -150,7 +151,7 @@ class ecqa(evaluate.Metric):
|
|
150 |
assert len(predictions) == len(references)
|
151 |
|
152 |
f1_acc = precision_acc = recall_acc = total = 0
|
153 |
-
for prediction, reference in zip(predictions, references):
|
154 |
total += 1
|
155 |
f1_computed, precision_computed, recall_computed = self.__compute_f1(prediction, reference)
|
156 |
|
|
|
17 |
import datasets
|
18 |
import re
|
19 |
import string
|
20 |
+
from tqdm import tqdm
|
21 |
from collections import Counter
|
22 |
|
23 |
# TODO: Add BibTeX citation
|
|
|
151 |
assert len(predictions) == len(references)
|
152 |
|
153 |
f1_acc = precision_acc = recall_acc = total = 0
|
154 |
+
for prediction, reference in tqdm(zip(predictions, references)):
|
155 |
total += 1
|
156 |
f1_computed, precision_computed, recall_computed = self.__compute_f1(prediction, reference)
|
157 |
|