You can programmatically generate your own samples using evalplus.data.
Expected Schema for samples.jsonl
When providing a JSONL file, use one of the following schemas:
task_id: The identifier string for the task.solution (optional): A self-contained solution (usually including the prompt).completion (optional): The function body without the prompt.
Note: If both solution and completion are provided, solution takes precedence.
Directory-based samples
Alternatively, you can provide a directory via --samples ${SAMPLE_DIR}. The directory must be organized as:
${SAMPLE_DIR}/${TASK_ID}/{SAMPLE_ID}.py where ${TASK_ID} is task_id.replace("/", "_").
from evalplus.data import get_[human_eval|mbpp]_plus, write_jsonl
samples = [
dict(task_id=task_id, solution=GEN_SOLUTION(problem["prompt"]))
for task_id, problem in get_[human_eval|mbpp]_plus().items()
]
write_jsonl("samples.jsonl", samples)