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

Function dump_humaneval_plus_mini

tools/tsr/minimization.py:164–182  ·  view source on GitHub ↗
(set_cover_info: Dict[str, List[str]], mini_path: str)

Source from the content-addressed store, hash-verified

162
163
164def dump_humaneval_plus_mini(set_cover_info: Dict[str, List[str]], mini_path: str):
165 new_problems = []
166 for task_id in task_ids:
167 otask = problems[task_id]
168 task = {
169 "task_id": task_id,
170 "prompt": otask["prompt"],
171 "contract": otask["contract"],
172 "canonical_solution": otask["canonical_solution"],
173 "entry_point": otask["entry_point"],
174 "base_input": otask["base_input"],
175 "plus_input": [],
176 "atol": otask["atol"],
177 }
178 for plus_test in set_cover_info[task_id]:
179 index = int(plus_test.split("_")[-1])
180 task["plus_input"].append(otask["plus_input"][index])
181 new_problems.append(deepcopy(task))
182 write_jsonl(os.path.join(mini_path, "HumanEvalPlus-Mini.jsonl"), new_problems)
183
184
185def main(flags):

Callers 1

mainFunction · 0.85

Calls 1

write_jsonlFunction · 0.90

Tested by

no test coverage detected