Datasets:
Formats:
json
Languages:
English
Size:
< 1K
Tags:
mathematics
information-theory
experimental-design
memory-compression
linear-algebra
quantum-information
Download tools/build_hf_data.py from PureOne/OQAIVAEI: direct link, hf CLI and curl.
- Browser
- Download file 1.76 kB
-
https://huggingface.co/datasets/PureOne/OQAIVAEI/resolve/main/tools/build_hf_data.py
- Command line
-
hf download hf://datasets/PureOne/OQAIVAEI/tools/build_hf_data.py
-
curl -L -o build_hf_data.py https://huggingface.co/datasets/PureOne/OQAIVAEI/resolve/main/tools/build_hf_data.py
1.76 kB
| """Normalize existing OQAIVAEI release arrays; no research calculations run here.""" | |
| from __future__ import annotations | |
| import json | |
| from pathlib import Path | |
| ROOT = Path(__file__).resolve().parents[1] | |
| def write_jsonl(name: str, rows: list[dict]) -> None: | |
| target = ROOT / "data" / f"{name}.jsonl" | |
| target.parent.mkdir(parents=True, exist_ok=True) | |
| text = "".join(json.dumps(row, ensure_ascii=False, sort_keys=True, allow_nan=False) + "\n" for row in rows) | |
| target.write_text(text, encoding="utf-8", newline="\n") | |
| print(f"{target.relative_to(ROOT)}: {len(rows)} rows") | |
| def main() -> None: | |
| claims = json.loads((ROOT / "research/docs/claims.json").read_text(encoding="utf-8"))["claims"] | |
| normalized = [] | |
| for c in claims: | |
| normalized.append({ | |
| "id": c["id"], "title": c["title"], "contract": c["contract"], | |
| "proof_status": c["proof_status"], "novelty_status": c["novelty_status"], | |
| "source": "research/" + c["source"], | |
| "labels": [p["label"] for p in c["locations"]], | |
| "theorem_numbers": [p["number"] for p in c["locations"]], | |
| "printed_pages": [int(p["printed_page"]) for p in c["locations"]], | |
| "evidence_files": ["research/" + p for p in c["evidence_files"]], | |
| }) | |
| family = json.loads((ROOT / "research/results/announcement_family.json").read_text(encoding="utf-8")) | |
| design = json.loads((ROOT / "research/results/codesign_results.json").read_text(encoding="utf-8")) | |
| write_jsonl("claims", normalized) | |
| write_jsonl("announcement_family", family["family"]) | |
| write_jsonl("memory_frontier", design["memory_frontier"]) | |
| write_jsonl("divisible_blocks", design["divisible_blocks"]) | |
| if __name__ == "__main__": | |
| main() | |