|
1 | 1 | from typing import Any, Dict, List, Optional |
2 | 2 |
|
| 3 | +from eval_protocol.common_utils import load_jsonl |
| 4 | +from eval_protocol.data_loader import DynamicDataLoader |
3 | 5 | from eval_protocol.models import ( |
4 | 6 | EvaluateResult, |
5 | 7 | EvaluationRow, |
|
11 | 13 | SingleTurnRolloutProcessor, |
12 | 14 | ) |
13 | 15 | from eval_protocol.pytest.evaluation_test import evaluation_test |
| 16 | +from eval_protocol.pytest.utils import parse_ep_max_rows |
14 | 17 |
|
15 | 18 | SYSTEM_PROMPT = ( |
16 | 19 | "You are a helpful math assistant. Please reason step by step, and put your final answer within \\boxed{...}." |
@@ -71,12 +74,29 @@ def aime2025_dataset_adapter(rows: List[Dict[str, Any]]) -> List[EvaluationRow]: |
71 | 74 | return converted |
72 | 75 |
|
73 | 76 |
|
| 77 | +_AIME2025_DATASET_URLS: List[str] = [ |
| 78 | + "https://huggingface.co/datasets/opencompass/AIME2025/raw/main/aime2025-I.jsonl", |
| 79 | + "https://huggingface.co/datasets/opencompass/AIME2025/raw/main/aime2025-II.jsonl", |
| 80 | +] |
| 81 | + |
| 82 | + |
| 83 | +def aime2025_data_generator() -> List[EvaluationRow]: |
| 84 | + """Load the AIME 2025 datasets and convert them into evaluation rows.""" |
| 85 | + dataset_rows: List[Dict[str, Any]] = [] |
| 86 | + for dataset_url in _AIME2025_DATASET_URLS: |
| 87 | + dataset_rows.extend(load_jsonl(dataset_url)) |
| 88 | + |
| 89 | + max_rows = parse_ep_max_rows(2) |
| 90 | + if max_rows is not None: |
| 91 | + dataset_rows = dataset_rows[:max_rows] |
| 92 | + |
| 93 | + return aime2025_dataset_adapter(dataset_rows) |
| 94 | + |
| 95 | + |
74 | 96 | @evaluation_test( |
75 | | - input_dataset=[ |
76 | | - "https://huggingface.co/datasets/opencompass/AIME2025/raw/main/aime2025-I.jsonl", |
77 | | - "https://huggingface.co/datasets/opencompass/AIME2025/raw/main/aime2025-II.jsonl", |
78 | | - ], |
79 | | - dataset_adapter=aime2025_dataset_adapter, |
| 97 | + data_loaders=DynamicDataLoader( |
| 98 | + generators=[aime2025_data_generator], |
| 99 | + ), |
80 | 100 | completion_params=[ |
81 | 101 | { |
82 | 102 | "max_tokens": 131000, |
|
0 commit comments