jjkim
commited on
Commit
·
f3c4092
1
Parent(s):
6f0ae1a
- code_eval.py +1 -3
code_eval.py
CHANGED
@@ -181,10 +181,8 @@ class CodeEval(evaluate.Metric):
|
|
181 |
|
182 |
with ThreadPoolExecutor(max_workers=num_workers) as executor:
|
183 |
results = {}
|
184 |
-
for tid,
|
185 |
results[tid] = []
|
186 |
-
pred = pred_d[pred_key]
|
187 |
-
ref = ref_d[ref_key]
|
188 |
for pid, p in enumerate(pred):
|
189 |
result = Result(task_id=tid, prediction_id=pid)
|
190 |
body = Template(pred_template).safe_substitute(prediction=p)
|
|
|
181 |
|
182 |
with ThreadPoolExecutor(max_workers=num_workers) as executor:
|
183 |
results = {}
|
184 |
+
for tid, pred, ref in zip(ids, predictions, references):
|
185 |
results[tid] = []
|
|
|
|
|
186 |
for pid, p in enumerate(pred):
|
187 |
result = Result(task_id=tid, prediction_id=pid)
|
188 |
body = Template(pred_template).safe_substitute(prediction=p)
|