Download src/softasp/sudoku_protocol.py from wabdalm/AS2: direct link, hf CLI and curl.
- Browser
- Download file 1.65 kB
-
https://huggingface.co/wabdalm/AS2/resolve/main/src/softasp/sudoku_protocol.py
- Command line
-
hf download hf://wabdalm/AS2/src/softasp/sudoku_protocol.py
-
curl -L -o sudoku_protocol.py https://huggingface.co/wabdalm/AS2/resolve/main/src/softasp/sudoku_protocol.py
1.65 kB
| """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.", | |
| } | |