(datasetPath: string)
| 178 | } |
| 179 | |
| 180 | async function loadDataset(datasetPath: string): Promise<LongMemEvalQuestion[]> { |
| 181 | const content = await readFile(datasetPath, "utf8"); |
| 182 | const parsed = JSON.parse(content) as unknown; |
| 183 | if (!Array.isArray(parsed)) { |
| 184 | throw new Error(`Dataset must be a JSON array: ${datasetPath}`); |
| 185 | } |
| 186 | return parsed as LongMemEvalQuestion[]; |
| 187 | } |
| 188 | |
| 189 | function selectQuestions(dataset: LongMemEvalQuestion[], config: RunnerConfig): Array<{ |
| 190 | question: LongMemEvalQuestion; |