MCPcopy Index your code
hub / github.com/evalplus/evalplus / debug_output

Function debug_output

tools/humaneval/fix_utils.py:39–54  ·  view source on GitHub ↗
(version: str, tasks: List[int])

Source from the content-addressed store, hash-verified

37
38
39def debug_output(version: str, tasks: List[int]):
40 with open(f"HumanEvalPlus-{version}.jsonl") as f:
41 data = [json.loads(line) for line in f.readlines() if line]
42
43 data = {x["task_id"]: x for x in data}
44 for tid in tasks:
45 title = f"HumanEval/{tid}:\n"
46 code = (
47 data[f"HumanEval/{tid}"]["prompt"]
48 + data[f"HumanEval/{tid}"]["contract"]
49 + data[f"HumanEval/{tid}"]["canonical_solution"]
50 )
51 print(title)
52 print(code)
53 exec(code)
54 print("====================================")

Callers 1

fix_v019.pyFile · 0.90

Calls 1

readlinesMethod · 0.80

Tested by

no test coverage detected