jjkim commited on
Commit
e7411b5
·
1 Parent(s): ae5996d
Files changed (1) hide show
  1. 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(ref_key=r)
192
- test = Template(test).safe_substitute(reference=p)
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)