| 162 | |
| 163 | |
| 164 | def 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 | |
| 185 | def main(flags): |