Spaces:
Runtime error
Runtime error
File size: 576 Bytes
951f760 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #!/usr/bin/env python3
from __future__ import annotations
from pathlib import Path
CANONICAL_SUBSETS = {
"MBPP": Path("data/benchmarks/mbpp.cycle1.jsonl"),
"GSM8K": Path("data/benchmarks/gsm8k.cycle1.jsonl"),
}
def resolve_benchmark_dataset(benchmark_name: str, explicit_path: Path | None) -> Path:
if explicit_path is not None:
return explicit_path
if benchmark_name not in CANONICAL_SUBSETS:
raise ValueError(f"Unsupported benchmark dataset: {benchmark_name}")
return Path.cwd() / CANONICAL_SUBSETS[benchmark_name]
|