jjkim commited on
Commit
e12251f
·
1 Parent(s): e7411b5
Files changed (1) hide show
  1. code_eval.py +3 -1
code_eval.py CHANGED
@@ -194,6 +194,7 @@ class CodeEval(evaluate.Metric):
194
  test_program = body + "\n" + test
195
  args = (test_program, timeout, tid, pid)
196
  future = executor.submit(check_correctness, *args)
 
197
  result.add(future)
198
  results[tid].append(result)
199
 
@@ -262,7 +263,8 @@ def estimate_pass_at_k(num_samples, num_correct, k):
262
  class Result(BaseModel):
263
  task_id: str
264
  prediction_id: int
265
-
 
266
  passed: Optional[bool] = None
267
  result: List[str] = []
268
  futures: List[object] = []
 
194
  test_program = body + "\n" + test
195
  args = (test_program, timeout, tid, pid)
196
  future = executor.submit(check_correctness, *args)
197
+ result.test_program.append(test_program)
198
  result.add(future)
199
  results[tid].append(result)
200
 
 
263
  class Result(BaseModel):
264
  task_id: str
265
  prediction_id: int
266
+
267
+ test_program: List[str] = []
268
  passed: Optional[bool] = None
269
  result: List[str] = []
270
  futures: List[object] = []