Repository navigation
Description
[Bug]: AIME25 shared disk cache duplicates AIME2025-I and omits AIME2025-II
Bug Description
AIME25.generate() requests opencompass/AIME2025 configurations
AIME2025-I and AIME2025-II, but passes the same explicit saved-dataset
directory, <datasets_dir>/hf_cache/aime25, to both calls.
load_from_huggingface() returns load_from_disk(cache_dir)[split] whenever
the saved directory can be loaded. It does not check whether its contents
match the requested dataset path or configuration.
On a clean cache, the first call saves AIME2025-I. The second call requests
AIME2025-II but reads the saved I dataset instead. Concatenation therefore
produces I + I: 30 rows containing only 15 distinct questions, rather
than the intended 30 distinct questions from I and II.
This silently changes the accuracy workload: I is evaluated twice and II is
never evaluated. Checking only the row count does not detect the problem.
The resulting parquet is reused on subsequent runs.
This collision is in the helper's explicit save_to_disk / load_from_disk
layer, not Hugging Face's normal download cache.
Source at the checked upstream revision:
- Both configurations use the same cache directory.
- The helper returns saved data without validating dataset identity.
- Existing parquet files bypass generation.
Steps to Reproduce
In the repository's installed development environment, run:
uv run python - <<'PY'
from pathlib import Path
from tempfile import TemporaryDirectory
from inference_endpoint.dataset_manager.predefined.aime25 import AIME25
with TemporaryDirectory() as tmp:
df = AIME25.generate(datasets_dir=Path(tmp))
print("rows:", len(df))
print("distinct questions:", df["question"].nunique())
assert len(df) == 30
assert df["question"].nunique() == 30
PYExpected: 30 rows and 30 distinct questions.
Buggy behavior: 30 rows and 15 distinct questions; the second assertion fails.
The temporary directory ensures no pre-existing parquet masks the generation
path.
Environment / Verification
- Upstream
mainchecked at commit
d3c57f2eba127c819e5a8fd83101d9e5f4e15fce. - No inference endpoint or model is required to reproduce.
- The cache behavior was reproduced by executing the actual helper function
with stubbed Hugging Face download/disk operations: the shared directory
returnedAIME2025-Itwice and downloaded only I; separate directories
returned I and II and downloaded both. - The live Hugging Face reproduction above is provided for maintainers; it
was not executed during this investigation.
Suggested Fix
Give each configuration a distinct saved-dataset directory:
<datasets_dir>/hf_cache/aime25-i
<datasets_dir>/hf_cache/aime25-ii
Add a targeted regression test that exercises the saved-cache behavior and
confirms the combined dataset contains both configurations.
Previously generated aime25/aime25.parquet files must also be invalidated
or regenerated: changing the helper cache paths alone will not replace them.
Before fixing the paths, force=True alone is insufficient because it skips
the parquet reuse check but still reuses the shared helper cache.
Before submitting
- I searched existing issues and found no duplicates.
Activity