File size: 509 Bytes
31dc8dc | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | '''
https://github.com/openai/simple-evals/blob/main/humaneval_eval.py
'''
import os
from collections import defaultdict
from typing import Any
import io
import numpy as np
from tqdm import tqdm
instruction = "Read the following function signature and docstring, and fully implement the function described. Your response should only contain the code for this function.\n"
def format_prompt(row: dict):
prompt_messages = instruction + row['prompt']
return prompt_messages, row['canonical_solution'] |