File size: 1,650 Bytes
69928d6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | """Metadata for immutable, recognized Sudoku dataset artifacts."""
from __future__ import annotations
LEGACY_DATA_PROTOCOL = "sudoku_legacy_mnist_pool_v1"
LEGACY_DATA_SHA256 = "8d0070b00ffc75763ceb8c2b29006823c80b70f50b6ca0018310d0fdc7b3828e"
def data_protocol_metadata(sha256: str, requested_id: str | None = None) -> dict:
"""Identify by content; never assign legacy or corrected claims to another file."""
known = sha256.lower() == LEGACY_DATA_SHA256
actual_id = LEGACY_DATA_PROTOCOL if known else None
if requested_id is not None and requested_id != actual_id:
raise ValueError("Data-protocol identifier does not match the dataset SHA256")
if not known:
return {
"id": None,
"status": "unregistered",
"source_image_split_disjointness": "not_established",
"evidence_label": "Unregistered dataset protocol; no source-image separation claim.",
}
return {
"id": LEGACY_DATA_PROTOCOL,
"status": "legacy",
"dataset_sha256": LEGACY_DATA_SHA256,
"splits": {"train": 9000, "val": 1000, "test": 1000},
"generation_seed": 42,
"split_seed_offsets": {"train": 0, "val": 100000, "test": 200000},
"initial_clues": 55,
"max_successful_removals": 10,
"observed_clues_per_board": 45,
"board_distribution": "transformations_of_one_base_solution",
"source_image_pool": "merged_original_mnist_train_and_test",
"source_image_split_disjointness": "not_established",
"evidence_label": "Legacy Sudoku dataset; source-image split disjointness not established.",
}
|