Datasets:
Tasks:
Question Answering
Modalities:
Text
Formats:
json
Languages:
English
Size:
1K - 10K
Tags:
aethersearch
agentic-search
retrieval-augmented-generation
multi-hop-question-answering
evaluation
benchmark
License:
Download verify_release.py from muradil211/AetherSearch_Eval_1400: direct link, hf CLI and curl.
- Browser
- Download file 6.89 kB
-
https://huggingface.co/datasets/muradil211/AetherSearch_Eval_1400/resolve/main/verify_release.py
- Command line
-
hf download hf://datasets/muradil211/AetherSearch_Eval_1400/verify_release.py
-
curl -L -o verify_release.py https://huggingface.co/datasets/muradil211/AetherSearch_Eval_1400/resolve/main/verify_release.py
6.89 kB
| """Validate the published frozen release without models or extra dependencies. | |
| The recorded independent build audit used raw training/source files. This | |
| release verifier checks published bytes, schema, counts and projections; it | |
| does not rerun training-source or semantic-neighbour retrieval. | |
| """ | |
| import hashlib | |
| import json | |
| import re | |
| import unicodedata | |
| from collections import Counter | |
| from pathlib import Path | |
| ROOT = Path(__file__).resolve().parent | |
| EXPECTED_COUNTS = { | |
| "NQ": 213, "TriviaQA": 213, "PopQA": 213, "HotpotQA": 212, | |
| "2WikiMultiHopQA": 212, "MuSiQue": 212, "Bamboogle": 125, | |
| } | |
| EXPECTED_SHA256 = "ecd634aac24013213ceca3523dc024d82544c5479546fe205da24d8e8ffea678" | |
| def require(condition, message): | |
| if not condition: | |
| raise ValueError(message) | |
| def sha256(path): | |
| h = hashlib.sha256() | |
| with path.open("rb") as stream: | |
| for chunk in iter(lambda: stream.read(1024 * 1024), b""): | |
| h.update(chunk) | |
| return h.hexdigest() | |
| def normalize(question): | |
| text = " ".join(unicodedata.normalize("NFKC", question).casefold().split()) | |
| return re.sub(r"[??]+$", "", text).strip() | |
| def jsonl(filename): | |
| rows = [] | |
| with (ROOT / filename).open(encoding="utf-8") as stream: | |
| for number, line in enumerate(stream, 1): | |
| require(bool(line.strip()), f"Blank row: {filename}:{number}") | |
| row = json.loads(line) | |
| require(isinstance(row, dict), f"Non-object row: {filename}:{number}") | |
| rows.append(row) | |
| return rows | |
| def main(): | |
| checksums = {} | |
| for line in (ROOT / "checksums.sha256").read_text().splitlines(): | |
| expected, relative = line.split(" ", 1) | |
| path = ROOT / relative | |
| require(path.resolve().is_relative_to(ROOT.resolve()), "Unsafe checksum path") | |
| require(relative not in checksums, "Duplicate checksum entry") | |
| require(sha256(path) == expected, f"SHA-256 mismatch: {relative}") | |
| checksums[relative] = expected | |
| require(checksums.get("eval_1400.jsonl") == EXPECTED_SHA256, | |
| "Unexpected frozen data SHA-256") | |
| manifest = json.loads((ROOT / "eval_1400_manifest.json").read_text()) | |
| report = json.loads((ROOT / "independent_validation.json").read_text()) | |
| audit = json.loads((ROOT / "eval_1400_exclusion_audit.json").read_text()) | |
| for value in (manifest, report, audit): | |
| require(value["status"] == "PASS", "Recorded build audit did not pass") | |
| require(manifest["total"] == report["total"] == 1400, "Wrong manifest total") | |
| require(manifest["seed"] == 42, "Wrong sampling seed") | |
| require(manifest["dataset_counts"] == report["dataset_counts"] == EXPECTED_COUNTS, | |
| "Wrong frozen composition") | |
| require(manifest["data_sha256"] == report["data_sha256"] == EXPECTED_SHA256, | |
| "Recorded data SHA-256 mismatch") | |
| for field, filename in ( | |
| ("exclusion_audit_sha256", "eval_1400_exclusion_audit.json"), | |
| ("diagnostics_sha256", "eval_1400_diagnostics.jsonl"), | |
| ("rollout_questions_sha256", "eval_1400_rollout_questions.jsonl"), | |
| ): | |
| require(manifest[field] == checksums[filename], f"Manifest mismatch: {filename}") | |
| for stage in ("SFT", "DPO", "RL"): | |
| require(manifest["exact_overlap_check"][stage] == | |
| report["training_overlaps"][stage] == audit["exact_overlap_final"][stage] == 0, | |
| f"Recorded training overlap: {stage}") | |
| require(report["all_fuzzy_flags_resolved"] is True, "Unresolved near-duplicate flags") | |
| require(report["known_high_confidence_near_duplicates"] == 0, | |
| "Recorded high-confidence near-duplicates") | |
| require(report["independent_training_exclusion_set_match"] is True, | |
| "Independent training exclusions did not match") | |
| require(report["deterministic_sampling_replay"] is True, "Sampling replay failed") | |
| require(report["rollout_gold_or_evidence_leakage"] == 0, "Recorded rollout leakage") | |
| rows = jsonl("eval_1400.jsonl") | |
| require(len(rows) == 1400, "Wrong data row count") | |
| require(Counter(row["source_dataset"] for row in rows) == EXPECTED_COUNTS, | |
| "Wrong data source counts") | |
| require([row["id"] for row in rows] == | |
| [f"eval1400_{number:04d}" for number in range(1, 1401)], "Changed IDs/order") | |
| raw, normalized = set(), set() | |
| required = {"id", "question", "answers", "source_dataset", "source_split", | |
| "source_id", "source_row_number", "source_file"} | |
| for row in rows: | |
| require(set(row) == required, f"Changed schema: {row.get('id')}") | |
| question = row["question"] | |
| require(isinstance(question, str) and bool(question.strip()), "Empty question") | |
| normal = normalize(question) | |
| require(bool(normal) and question not in raw and normal not in normalized, | |
| f"Duplicate or empty normalized question: {row['id']}") | |
| raw.add(question) | |
| normalized.add(normal) | |
| require(isinstance(row["answers"], list) and bool(row["answers"]) and | |
| all(isinstance(alias, str) and bool(alias.strip()) for alias in row["answers"]), | |
| f"Empty/invalid gold aliases: {row['id']}") | |
| source = manifest["sources"][row["source_dataset"]] | |
| require(row["source_split"] == source["source_split"] and | |
| row["source_split"] in {"dev", "test", "eval"}, "Unexpected source split") | |
| require(row["source_file"] == source["path"], "Source-file provenance mismatch") | |
| require(type(row["source_row_number"]) is int and | |
| 1 <= row["source_row_number"] <= source["expected_rows"], "Invalid source row") | |
| if row["source_dataset"] in {"NQ", "Bamboogle"}: | |
| require(row["source_id"] is None, "Unexpected source ID for an ID-less source") | |
| else: | |
| require(isinstance(row["source_id"], str) and bool(row["source_id"].strip()), | |
| "Missing original source ID") | |
| rollout = jsonl("eval_1400_rollout_questions.jsonl") | |
| require(rollout == [{"id": row["id"], "question": row["question"]} for row in rows], | |
| "Question-only rollout projection mismatch or added fields") | |
| ids = {row["id"] for row in rows} | |
| diagnostics = jsonl("eval_1400_diagnostics.jsonl") | |
| require(all(row["id"] in ids for row in diagnostics), "Unknown diagnostic ID") | |
| require(len({row["id"] for row in diagnostics}) == len(diagnostics), | |
| "Repeated diagnostic ID") | |
| print(json.dumps({"status": "PASS", "total": len(rows), | |
| "dataset_counts": dict(EXPECTED_COUNTS), | |
| "recorded_training_overlaps": report["training_overlaps"], | |
| "internal_duplicates": 0, "empty_answers": 0, | |
| "rollout_projection": "PASS", "checked_files": len(checksums), | |
| "data_sha256": EXPECTED_SHA256}, indent=2)) | |
| if __name__ == "__main__": | |
| main() | |