jjkim
commited on
Commit
·
e7411b5
1
Parent(s):
ae5996d
- code_eval.py +2 -2
code_eval.py
CHANGED
@@ -188,8 +188,8 @@ class CodeEval(evaluate.Metric):
|
|
188 |
body = Template(pred_template).safe_substitute(prediction=p)
|
189 |
for r in ref:
|
190 |
assert isinstance(r, str)
|
191 |
-
test = Template(ref_template).safe_substitute(
|
192 |
-
test = Template(test).safe_substitute(
|
193 |
|
194 |
test_program = body + "\n" + test
|
195 |
args = (test_program, timeout, tid, pid)
|
|
|
188 |
body = Template(pred_template).safe_substitute(prediction=p)
|
189 |
for r in ref:
|
190 |
assert isinstance(r, str)
|
191 |
+
test = Template(ref_template).safe_substitute(reference=r)
|
192 |
+
test = Template(test).safe_substitute(prediction=p)
|
193 |
|
194 |
test_program = body + "\n" + test
|
195 |
args = (test_program, timeout, tid, pid)
|