Datasets:
Tasks:
Other
Formats:
json
Languages:
English
Size:
< 1K
Tags:
mathematics
recursive-self-improvement
symbolic-reasoning
exact-arithmetic
sparse-reconstruction
positive-spectral-measures
License:
Download tools/export_hf_data.py from PureOne/EVE-NOCHRAEL-v1.0: direct link, hf CLI and curl.
- Browser
- Download file 9.8 kB
-
https://huggingface.co/datasets/PureOne/EVE-NOCHRAEL-v1.0/resolve/main/tools/export_hf_data.py
- Command line
-
hf download hf://datasets/PureOne/EVE-NOCHRAEL-v1.0/tools/export_hf_data.py
-
curl -L -o export_hf_data.py https://huggingface.co/datasets/PureOne/EVE-NOCHRAEL-v1.0/resolve/main/tools/export_hf_data.py
9.8 kB
| #!/usr/bin/env python3 | |
| """Deterministically export viewer tables from the immutable v1.0.0 results. | |
| Uses only the Python standard library; does not run or retime experiments. | |
| """ | |
| from __future__ import annotations | |
| import hashlib | |
| import json | |
| from pathlib import Path | |
| ROOT = Path(__file__).resolve().parents[1] | |
| def sha256(path: Path) -> str: | |
| return hashlib.sha256(path.read_bytes()).hexdigest() | |
| def export() -> dict: | |
| sources = {} | |
| tables = [] | |
| def read(relative: str): | |
| p = ROOT / "research" / relative | |
| sources[relative] = sha256(p) | |
| return json.loads(p.read_text(encoding="utf-8")) | |
| def write(name: str, rows: list[dict], origin: str, description: str): | |
| relative = "data/" + name + ".jsonl" | |
| p = ROOT / relative | |
| p.parent.mkdir(parents=True, exist_ok=True) | |
| p.write_text("".join(json.dumps(row, ensure_ascii=False, sort_keys=True, | |
| allow_nan=False) + "\n" for row in rows), | |
| encoding="utf-8") | |
| tables.append({"config_name": name, "path": relative, "split": "data", | |
| "rows": len(rows), "source": "research/" + origin, | |
| "description": description, "sha256": sha256(p)}) | |
| summary = read("results/summary.json") | |
| rows = [] | |
| for row in summary["cycle_results"]: | |
| rows.append({**row, "scope": "controlled_algebraic_family", | |
| "accuracy_percent": 100 * row["correct"] / row["total"], | |
| "timing_source": "original_reference_run"}) | |
| write("recursive_summary", rows, "results/summary.json", | |
| "Eight original aggregate method/state measurements, including cycle zero.") | |
| rows = [] | |
| for row in read("results/recursive_metrics.json"): | |
| acquisition = row.get("acquisition", {}) | |
| rows.append({ | |
| "seed": row["seed"], "method": row["method"], | |
| "evaluation_state": str(row["cycle"]), | |
| "cycle_index": row["cycle"] if isinstance(row["cycle"], int) else None, | |
| "scope": "outside_family" if row["cycle"] == "outside_after_3" else "controlled_algebraic_family", | |
| "correct": row["correct"], "total": row["total"], | |
| "accuracy": row["accuracy"], | |
| "exact_frequency_checks": row["exact_frequency_checks"], | |
| "evaluation_seconds": row["evaluation_seconds"], | |
| "update_calls": row["update_calls"], | |
| "update_seconds": row.get("update_seconds"), | |
| "source_atoms": row.get("source_atoms"), | |
| "defect_atoms": row.get("defect_atoms"), | |
| "atom_visits": acquisition.get("atom_visits"), | |
| "max_derivative_order": acquisition.get("max_derivative_order"), | |
| "response_bits": acquisition.get("response_bits"), | |
| "polynomial_work_units": acquisition.get("polynomial_work_units"), | |
| "memory_corrections": row.get("memory_corrections"), | |
| "memory_eigenvalues": row.get("memory_eigenvalues"), | |
| "memory_serialized_bytes": row.get("memory_serialized_bytes"), | |
| "max_inverse_degree_bound": row.get("max_inverse_degree_bound"), | |
| "timing_source": "original_reference_run", | |
| }) | |
| write("recursive_runs", rows, "results/recursive_metrics.json", | |
| "100 original per-seed records: 80 in-family states and 20 outside-family evaluations.") | |
| rows = [] | |
| for row in read("results/reconstruction.json"): | |
| for method, key in [("trace_completed", "trace_method"), ("bounded_kronecker_prony", "kronecker_baseline")]: | |
| metrics = row[key] | |
| rows.append({ | |
| "seed": row["seed"], "method": method, | |
| "dimension": row["dimension"], "atoms": row["atoms"], | |
| "exact_success": row["exact_success"], | |
| "scalar_calls": metrics["calls"], "cache_hits": metrics["cache_hits"], | |
| "atom_visits": metrics["atom_visits"], | |
| "max_derivative_order": metrics["max_derivative_order"], | |
| "response_bits": metrics["response_bits"], | |
| "max_response_bits": metrics["max_response_bits"], | |
| "polynomial_work_units": metrics["polynomial_work_units"], | |
| "acquisition_seconds": metrics["acquisition_seconds"], | |
| "total_seconds": metrics["total_seconds"], | |
| "directions_tried": metrics.get("directions_tried"), | |
| "dense_entries_formula": row["full_tensor_scalar_entries_formula"], | |
| "dense_runtime_measured": row["full_tensor_runtime_measured"], | |
| "timing_source": "original_reference_run", | |
| }) | |
| write("reconstruction_runs", rows, "results/reconstruction.json", | |
| "72 method records for 36 shared exact reconstruction instances; different prior-information contracts.") | |
| rows = [{"method": method, **metrics, | |
| "accuracy": metrics["correct"] / metrics["total"], | |
| "evaluation_state": "outside_after_3", "scope": "outside_family"} | |
| for method, metrics in sorted(summary["outside_family_results"].items())] | |
| write("outside_family", rows, "results/summary.json", | |
| "Two aggregate outside-family scores; a subset aggregation of recursive_runs.") | |
| claims = read("docs/CLAIM_LEDGER.json")["claims"] | |
| rows = [{"claim_id": c["id"], "claim": c["claim"], "status": c["status"], | |
| "historical_novelty_status": c.get("historical_novelty_status", "Not specified for this individual claim; no historical-priority certification."), | |
| "source_labels_json": json.dumps(c.get("source_labels", []), ensure_ascii=False), | |
| "evidence_paths_json": json.dumps(["research/" + p for p in c.get("evidence_files", [])], ensure_ascii=False), | |
| "limitations_json": json.dumps(c.get("limitations", []), ensure_ascii=False)} | |
| for c in claims] | |
| write("claim_ledger", rows, "docs/CLAIM_LEDGER.json", | |
| "20 original claim-status entries; strings preserve the author's exact claim wording.") | |
| rows = [] | |
| for row in read("results/symbolic_transfer.json"): | |
| enumeration = row.get("independent_enumeration") | |
| rows.append({"seed": row["seed"], "task": row["task"], | |
| "modulus_decimal": str(row["modulus"]), | |
| "exact_answer_decimal": str(row["exact_answer"]), | |
| "independent_enumeration_decimal": None if enumeration is None else str(enumeration), | |
| "exhaustively_enumerated": enumeration is not None, | |
| "enumeration_matches": None if enumeration is None else enumeration == row["exact_answer"], | |
| "status": row.get("status", "Exact answer checked against independent exhaustive enumeration.")}) | |
| write("arithmetic_tasks", rows, "results/symbolic_transfer.json", | |
| "280 arithmetic records: 220 enumerated small-modulus checks and 60 unenumerated large-modulus answers.") | |
| rows = [{"cycle": int(c), "successful_runs": n, "total_runs": 10, | |
| "scalar_query_budget": 12, "residual_filter_enabled": False} | |
| for c, n in sorted(summary["no_residual_ablation"].items())] | |
| write("ablation_summary", rows, "results/summary.json", | |
| "Three residual-filter ablation aggregates under the same twelve-query limit.") | |
| rows = [] | |
| for row in read("results/trainable_bridge.json")["runs"]: | |
| training, recon = row["training"], row["reconstruction"] | |
| rows.append({"seed": row["seed"], | |
| "trainable_parameters": training["trainable_parameters"], | |
| "training_steps": training["steps"], | |
| "training_size": training["training_size"], | |
| "heldout_size": training["heldout_size"], | |
| "initial_training_mse": training["initial_training_mse"], | |
| "final_training_mse": training["final_training_mse"], | |
| "heldout_mse": training["heldout_mse"], | |
| "heldout_relative_frobenius_error": training["heldout_relative_frobenius_error"], | |
| "training_seconds": training["seconds"], | |
| "reconstruction_seconds": recon["seconds"], | |
| "exact_reconstruction": recon["exact_reduced_support_and_dyadic_weights_equal"], | |
| "finite_certificate_passed": recon["finite_certificate_passed"], | |
| "maximum_prediction_difference": recon["maximum_heldout_prediction_difference_from_original"], | |
| "intelligence_gain_claimed": recon["intelligence_gain_claimed"], | |
| "end_to_end_speedup_claimed": recon["end_to_end_speedup_claimed"], | |
| "timing_source": "original_reference_run"}) | |
| write("trainable_bridge", rows, "results/trainable_bridge.json", | |
| "Five post-training representation-reconstruction checks; no intelligence-gain measurement.") | |
| lineage = {"schema_version": "1.0", "research_version": "1.0.0", | |
| "packaging_version": "1.0.0-hf.1", "exporter": "tools/export_hf_data.py", | |
| "source_hashes": sources, "tables": tables, | |
| "total_table_rows": sum(t["rows"] for t in tables), | |
| "interpretation": "Tables summarize published reference records. Row counts are not counts of independent experiments or learning examples. No new experiment or timing is generated."} | |
| p = ROOT / "metadata/export_lineage.json" | |
| p.parent.mkdir(exist_ok=True) | |
| p.write_text(json.dumps(lineage, ensure_ascii=False, indent=2, sort_keys=True) + "\n", encoding="utf-8") | |
| return lineage | |
| if __name__ == "__main__": | |
| result = export() | |
| print(json.dumps({"configs": len(result["tables"]), "table_rows": result["total_table_rows"]})) | |