ChangChrisLiu commited on
Commit
ed80f9c
·
verified ·
1 Parent(s): 5207eeb

Freeze and document the Active-13 source-group split

Browse files

Adds the hash-bound 4,937-episode Active-13 train/validation/test split, metadata-only provenance, verification record, deterministic freezer, and updated operator guidance. Canonical episode ZIPs and the type_clip32 overlay are unchanged.

CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
  # Changelog
2
 
 
 
 
 
 
 
 
 
 
3
  ## 2026-07-28 — active 13-task standalone-GNN data view
4
 
5
  - Replaced the mixed-generation 2,902-line root dataset card with one operator guide for download, exhaustive verification, overlay-aware temporal loading, batching, causality, split discipline, and model-facing tensor semantics.
 
1
  # Changelog
2
 
3
+ ## 2026-07-28 — frozen Active-13 source-group split
4
+
5
+ - Published the Active-13 source-factor-group split under immutable tag `gwam-13task-data-v4`; the earlier `gwam-13task-data-v3` documentation/data-view tag was not moved.
6
+ - Materialized all 4,937 selected identities into 3,943 train, 544 validation, and 450 test episodes across 852/101/103 source groups.
7
+ - Bound the split to SHA256 `0235ea9e7f0d40fec616e62a4be92622c139cb2ff912e117b39edb7bc1651e80` and recorded zero cross-split groups.
8
+ - Added metadata-only provenance for all 4,937 rows. Split construction opened only `graph_static.json` and source `ep_meta.json`, not held-out graph or visual targets.
9
+ - Documented that per-episode artifacts must include `source_tier + task + episode_id` because three task names occur in both source tiers.
10
+ - Kept all canonical episode ZIP bytes and the hash-bound `type_clip32` overlay unchanged.
11
+
12
  ## 2026-07-28 — active 13-task standalone-GNN data view
13
 
14
  - Replaced the mixed-generation 2,902-line root dataset card with one operator guide for download, exhaustive verification, overlay-aware temporal loading, batching, causality, split discipline, and model-facing tensor semantics.
README.md CHANGED
@@ -45,6 +45,8 @@ Use these files as the source of truth:
45
  | Active 13-task roster and counts | `gwam_13task_active_v1_20260728/TASKS.json` |
46
  | One row per selected episode | `gwam_13task_active_v1_20260728/MANIFEST.jsonl` |
47
  | Completed integrity/loader gate | `gwam_13task_active_v1_20260728/VERIFICATION.json` |
 
 
48
  | Normative temporal loader | `loaders/gwam_full_graph_window.py` |
49
  | On-disk and model-facing tensor semantics | `SCHEMA.md` |
50
  | Canonical full-release identities | `gwam_v12_sparse_v2/MANIFEST.jsonl` |
@@ -72,7 +74,7 @@ The excluded episode repeatedly failed RoboCasa environment initialization. It h
72
  ### Active 13-task view
73
 
74
  ```text
75
- reproducible Hub tag: gwam-13task-data-v3
76
  task names: 13
77
  split/task collections: 16
78
  selected episode ZIPs: 4,937
@@ -80,6 +82,9 @@ selected canonical bytes: 33,667,996,737
80
  active manifest SHA256: bbc1d509a746b86e81dd07247b9ef721df39a7d82a44de6a3ec5247ecaa8cd2b
81
  selected overlay rows: 146
82
  selected temporal quarantine rows: 0
 
 
 
83
  ```
84
 
85
  Three names occur independently in both `target` and `pretrain`: `PickPlaceCounterToCabinet`, `PickPlaceCounterToStove`, and `PickPlaceSinkToCounter`. Keep `split/task/episode_id` as the episode identity; never collapse rows by task name plus episode number alone.
@@ -102,14 +107,14 @@ Three names occur independently in both `target` and `pretrain`: `PickPlaceCount
102
 
103
  ## Download the active 13 tasks
104
 
105
- Use the immutable `gwam-13task-data-v3` tag. Download every matching split instead of assuming a task exists in only one tier.
106
 
107
  ### Python
108
 
109
  ```python
110
  from huggingface_hub import snapshot_download
111
 
112
- REVISION = "gwam-13task-data-v3"
113
  TASKS = [
114
  "CoffeeSetupMug",
115
  "OpenDrawer",
@@ -137,6 +142,7 @@ patterns += [
137
  "gwam_v12_sparse_v2_type_clip32_patch_20260725/**",
138
  "gwam_v12_temporal_graph_training_v1_20260725/**",
139
  "gwam_13task_active_v1_20260728/**",
 
140
  "loaders/**",
141
  "tests/test_gwam_full_graph_window.py",
142
  ]
@@ -156,7 +162,7 @@ snapshot_download(
156
  ```bash
157
  hf download ChangChrisLiu/GWAM_Data \
158
  --repo-type dataset \
159
- --revision gwam-13task-data-v3 \
160
  --include 'gwam_v12_sparse_v2/episodes/*/CoffeeSetupMug/*.zip' \
161
  --include 'gwam_v12_sparse_v2/episodes/*/OpenDrawer/*.zip' \
162
  --include 'gwam_v12_sparse_v2/episodes/*/PickPlaceCabinetToCounter/*.zip' \
@@ -175,6 +181,7 @@ hf download ChangChrisLiu/GWAM_Data \
175
  --include 'gwam_v12_sparse_v2_type_clip32_patch_20260725/**' \
176
  --include 'gwam_v12_temporal_graph_training_v1_20260725/**' \
177
  --include 'gwam_13task_active_v1_20260728/**' \
 
178
  --include 'loaders/**' \
179
  --include 'tests/test_gwam_full_graph_window.py' \
180
  --include 'README.md' \
@@ -471,6 +478,7 @@ The authoritative schema, node-state channel table, mask codec, camera mapping,
471
  | `gwam_v12_sparse_v2_type_clip32_patch_20260725/` | additive overlay | 426 hash-bound `type_clip32` episode rows; 264 unique blobs |
472
  | `gwam_v12_temporal_graph_training_v1_20260725/` | derived metadata | causal window contract; 10,538 eligible and 26 quarantined full-release episodes |
473
  | `gwam_13task_active_v1_20260728/` | active selection | 4,937 selected rows; no selected temporal quarantine |
 
474
  | `loaders/` | executable contract | temporal and legacy single-frame loaders |
475
 
476
  The older `gwam_graph_dataloader.py` is retained only as a single-timestep compatibility example. It does not apply the active overlay and is not the normative standalone-GNN training path.
@@ -497,11 +505,36 @@ Live extraction is a separate runtime path. Passing the static dataset gate does
497
 
498
  ## Evaluation and split discipline
499
 
500
- No official train/validation/test partition ships with v1.2. Freeze the split before training and publish it with the run.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
501
 
502
  Required rules:
503
 
504
- 1. Split by complete episode/source group; never split windows from one episode across train and evaluation.
505
  2. Preserve `split/task/episode_id` identity.
506
  3. Report per-task metrics in addition to pooled metrics.
507
  4. Separate teacher-forced and autoregressive rollout results.
 
45
  | Active 13-task roster and counts | `gwam_13task_active_v1_20260728/TASKS.json` |
46
  | One row per selected episode | `gwam_13task_active_v1_20260728/MANIFEST.jsonl` |
47
  | Completed integrity/loader gate | `gwam_13task_active_v1_20260728/VERIFICATION.json` |
48
+ | Frozen Active-13 model split | `training_splits/active13_gnn_v1/MANIFEST.jsonl` |
49
+ | Split provenance and verification | `training_splits/active13_gnn_v1/VERIFICATION.json` |
50
  | Normative temporal loader | `loaders/gwam_full_graph_window.py` |
51
  | On-disk and model-facing tensor semantics | `SCHEMA.md` |
52
  | Canonical full-release identities | `gwam_v12_sparse_v2/MANIFEST.jsonl` |
 
74
  ### Active 13-task view
75
 
76
  ```text
77
+ reproducible Hub tag: gwam-13task-data-v4
78
  task names: 13
79
  split/task collections: 16
80
  selected episode ZIPs: 4,937
 
82
  active manifest SHA256: bbc1d509a746b86e81dd07247b9ef721df39a7d82a44de6a3ec5247ecaa8cd2b
83
  selected overlay rows: 146
84
  selected temporal quarantine rows: 0
85
+ source-group split SHA256: 0235ea9e7f0d40fec616e62a4be92622c139cb2ff912e117b39edb7bc1651e80
86
+ split episodes (train/val/test): 3,943 / 544 / 450
87
+ split groups (train/val/test): 852 / 101 / 103
88
  ```
89
 
90
  Three names occur independently in both `target` and `pretrain`: `PickPlaceCounterToCabinet`, `PickPlaceCounterToStove`, and `PickPlaceSinkToCounter`. Keep `split/task/episode_id` as the episode identity; never collapse rows by task name plus episode number alone.
 
107
 
108
  ## Download the active 13 tasks
109
 
110
+ Use the immutable `gwam-13task-data-v4` tag. Download every matching source tier instead of assuming a task exists in only one tier.
111
 
112
  ### Python
113
 
114
  ```python
115
  from huggingface_hub import snapshot_download
116
 
117
+ REVISION = "gwam-13task-data-v4"
118
  TASKS = [
119
  "CoffeeSetupMug",
120
  "OpenDrawer",
 
142
  "gwam_v12_sparse_v2_type_clip32_patch_20260725/**",
143
  "gwam_v12_temporal_graph_training_v1_20260725/**",
144
  "gwam_13task_active_v1_20260728/**",
145
+ "training_splits/active13_gnn_v1/**",
146
  "loaders/**",
147
  "tests/test_gwam_full_graph_window.py",
148
  ]
 
162
  ```bash
163
  hf download ChangChrisLiu/GWAM_Data \
164
  --repo-type dataset \
165
+ --revision gwam-13task-data-v4 \
166
  --include 'gwam_v12_sparse_v2/episodes/*/CoffeeSetupMug/*.zip' \
167
  --include 'gwam_v12_sparse_v2/episodes/*/OpenDrawer/*.zip' \
168
  --include 'gwam_v12_sparse_v2/episodes/*/PickPlaceCabinetToCounter/*.zip' \
 
181
  --include 'gwam_v12_sparse_v2_type_clip32_patch_20260725/**' \
182
  --include 'gwam_v12_temporal_graph_training_v1_20260725/**' \
183
  --include 'gwam_13task_active_v1_20260728/**' \
184
+ --include 'training_splits/active13_gnn_v1/**' \
185
  --include 'loaders/**' \
186
  --include 'tests/test_gwam_full_graph_window.py' \
187
  --include 'README.md' \
 
478
  | `gwam_v12_sparse_v2_type_clip32_patch_20260725/` | additive overlay | 426 hash-bound `type_clip32` episode rows; 264 unique blobs |
479
  | `gwam_v12_temporal_graph_training_v1_20260725/` | derived metadata | causal window contract; 10,538 eligible and 26 quarantined full-release episodes |
480
  | `gwam_13task_active_v1_20260728/` | active selection | 4,937 selected rows; no selected temporal quarantine |
481
+ | `training_splits/active13_gnn_v1/` | frozen model split | source-factor-group-disjoint Active-13 train/validation/test contract |
482
  | `loaders/` | executable contract | temporal and legacy single-frame loaders |
483
 
484
  The older `gwam_graph_dataloader.py` is retained only as a single-timestep compatibility example. It does not apply the active overlay and is not the normative standalone-GNN training path.
 
505
 
506
  ## Evaluation and split discipline
507
 
508
+ The canonical v1.2 release has no universal train/validation/test partition. The Active-13 standalone-GNN program now has one model-specific frozen contract at `training_splits/active13_gnn_v1/MANIFEST.jsonl`; do not treat it as a universal split for other task selections.
509
+
510
+ The split groups complete episodes by `task + layout_id + style_id + ep_meta.fixture_refs`, orders groups deterministically with seed `20260728`, and assigns complete groups to train/validation/test. Its JSONL SHA256 is `0235ea9e7f0d40fec616e62a4be92622c139cb2ff912e117b39edb7bc1651e80`. `VERIFICATION.json` records 4,937 unique identities, 1,056 groups, all 13 tasks in all three partitions, and zero cross-partition groups. Group construction read only `graph_static.json` and source `ep_meta.json`; held-out dynamic edges, node states, masks, view evidence, and visual features were not opened.
511
+
512
+ Load the split by its full identity:
513
+
514
+ ```python
515
+ import json
516
+ from pathlib import Path
517
+
518
+ root = Path("GWAM_Data_13tasks")
519
+ split_rows = [
520
+ json.loads(line)
521
+ for line in (
522
+ root / "training_splits/active13_gnn_v1/MANIFEST.jsonl"
523
+ ).read_text().splitlines()
524
+ if line
525
+ ]
526
+
527
+ train_rows = [row for row in split_rows if row["model_split"] == "train"]
528
+ assert len(split_rows) == 4_937
529
+ assert len(train_rows) == 3_943
530
+ assert len({row["episode"] for row in split_rows}) == 4_937
531
+ ```
532
+
533
+ The three dual-tier task names reuse episode numbers. Any per-episode cache or statistics artifact must therefore include `source_tier + task + episode_id`; `task + episode_id` is not collision-safe.
534
 
535
  Required rules:
536
 
537
+ 1. Use the frozen source-group assignment unchanged; never repartition windows from one episode across train and evaluation.
538
  2. Preserve `split/task/episode_id` identity.
539
  3. Report per-task metrics in addition to pooled metrics.
540
  4. Separate teacher-forced and autoregressive rollout results.
gwam_13task_active_v1_20260728/README.md CHANGED
@@ -40,7 +40,7 @@ Every other NPZ array remains canonical. Consumers must verify the canonical ZIP
40
 
41
  ## Required loader invocation
42
 
43
- Use `loaders/gwam_full_graph_window.py` from the pinned `gwam-13task-data-v3` tag. Do not edit or rewrite canonical ZIPs:
44
 
45
  ```python
46
  import json
 
40
 
41
  ## Required loader invocation
42
 
43
+ Use `loaders/gwam_full_graph_window.py` from the pinned `gwam-13task-data-v4` tag. Do not edit or rewrite canonical ZIPs:
44
 
45
  ```python
46
  import json
training_splits/active13_gnn_v1/MANIFEST.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
training_splits/active13_gnn_v1/README.md ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Active-13 standalone-GNN source-group split v1
2
+
3
+ This directory freezes the model-specific train/validation/test assignment for the 4,937-episode Active-13 RoboCasa graph view. It does not redefine the canonical `GWAM_Data` v1.2 release and should not be reused as a universal split for other task selections.
4
+
5
+ ## Contract
6
+
7
+ ```text
8
+ group definition: task + layout_id + style_id + ep_meta.fixture_refs
9
+ seed: 20260728
10
+ assignment: SHA256 group order, cumulative episode midpoint at 0.8/0.9
11
+ episodes: 3,943 train / 544 validation / 450 test
12
+ groups: 852 train / 101 validation / 103 test
13
+ cross-split groups: 0
14
+ ```
15
+
16
+ `MANIFEST.jsonl` preserves the complete `source_tier/task/episode_id` identity. Three task names occur in both `target` and `pretrain`; never join or cache them by `task + episode_id` alone.
17
+
18
+ ## Files and hashes
19
+
20
+ | File | Purpose | SHA256 |
21
+ |---|---|---|
22
+ | `MANIFEST.jsonl` | Frozen assignment | `0235ea9e7f0d40fec616e62a4be92622c139cb2ff912e117b39edb7bc1651e80` |
23
+ | `SOURCE_PROVENANCE.jsonl` | Per-episode metadata hashes | `78b16ba4fdbdd06235f65b51d9485aa3dbc05482c6b6ec12ee3c97f46c5d654c` |
24
+ | `SUMMARY.json` | Per-task episode/group counts | `d4d916c03f50fbbc6fb233808af3a830d32c2b61c5553ad9c0a97ba7129b84c1` |
25
+ | `VERIFICATION.json` | Structural PASS record | `d2991c92b0add6a2412757649d3c46d3c37bc0746ce2647c3a25772e908bd6bb` |
26
+ | `freeze_source_group_split.py` | Deterministic freezer/verifier | `1cc651c51661401dcfd3ff8fc168a4c1bc37518ac79f1416e29f39037f13b418` |
27
+
28
+ The split freezer read only each selected ZIP's `graph_static.json` and the locally joined source `ep_meta.json`. It did not open validation or test dynamic edges, node-state arrays, masks, view evidence, or visual features. Recomputing source factors requires the original RoboCasa LeRobot `extras/episode_*` metadata; downloading the graph ZIPs alone is sufficient to use the already-frozen manifest, but not to reconstruct those source factors independently.
29
+
30
+ ## Use
31
+
32
+ ```python
33
+ import json
34
+ from pathlib import Path
35
+
36
+ root = Path("GWAM_Data_13tasks")
37
+ rows = [
38
+ json.loads(line)
39
+ for line in (root / "training_splits/active13_gnn_v1/MANIFEST.jsonl")
40
+ .read_text()
41
+ .splitlines()
42
+ if line
43
+ ]
44
+ train = [row for row in rows if row["model_split"] == "train"]
45
+
46
+ assert len(rows) == 4_937
47
+ assert len(train) == 3_943
48
+ assert len({row["episode"] for row in rows}) == 4_937
49
+ ```
50
+
51
+ Fit normalizers, proposal distributions, and all learned preprocessing only on `model_split == "train"`. Do not use validation or test target arrays for fitting.
training_splits/active13_gnn_v1/SOURCE_PROVENANCE.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
training_splits/active13_gnn_v1/SUMMARY.json ADDED
@@ -0,0 +1,255 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "active_manifest_sha256": "bbc1d509a746b86e81dd07247b9ef721df39a7d82a44de6a3ec5247ecaa8cd2b",
3
+ "assignment": "sha256 group order with cumulative episode midpoint at 0.8/0.9",
4
+ "cross_split_group_count": 0,
5
+ "cross_split_group_examples": [],
6
+ "episode_split_counts": {
7
+ "test": 450,
8
+ "train": 3943,
9
+ "validation": 544
10
+ },
11
+ "episodes": 4937,
12
+ "group_definition": "task + layout_id + style_id + ep_meta.fixture_refs",
13
+ "group_split_counts": {
14
+ "test": 103,
15
+ "train": 852,
16
+ "validation": 101
17
+ },
18
+ "groups": 1056,
19
+ "held_out_scan_boundary": "graph_static and source ep_meta metadata only; no validation or test dynamic, node-state, mask, view-evidence, or visual-feature targets",
20
+ "schema": "gwam.active13.source_group_split.v1",
21
+ "seed": 20260728,
22
+ "source_metadata_rows": 4937,
23
+ "source_provenance_sha256": "78b16ba4fdbdd06235f65b51d9485aa3dbc05482c6b6ec12ee3c97f46c5d654c",
24
+ "source_tier_counts": {
25
+ "pretrain": 869,
26
+ "target": 4068
27
+ },
28
+ "split_manifest_sha256": "0235ea9e7f0d40fec616e62a4be92622c139cb2ff912e117b39edb7bc1651e80",
29
+ "tasks": {
30
+ "CoffeeSetupMug": {
31
+ "episode_split_counts": {
32
+ "test": 54,
33
+ "train": 392,
34
+ "validation": 56
35
+ },
36
+ "episodes": 502,
37
+ "group_split_counts": {
38
+ "test": 1,
39
+ "train": 8,
40
+ "validation": 1
41
+ },
42
+ "groups": 10,
43
+ "source_tier_counts": {
44
+ "target": 502
45
+ }
46
+ },
47
+ "OpenDrawer": {
48
+ "episode_split_counts": {
49
+ "test": 51,
50
+ "train": 409,
51
+ "validation": 53
52
+ },
53
+ "episodes": 513,
54
+ "group_split_counts": {
55
+ "test": 8,
56
+ "train": 64,
57
+ "validation": 7
58
+ },
59
+ "groups": 79,
60
+ "source_tier_counts": {
61
+ "target": 513
62
+ }
63
+ },
64
+ "PickPlaceCabinetToCounter": {
65
+ "episode_split_counts": {
66
+ "test": 11,
67
+ "train": 85,
68
+ "validation": 10
69
+ },
70
+ "episodes": 106,
71
+ "group_split_counts": {
72
+ "test": 11,
73
+ "train": 85,
74
+ "validation": 10
75
+ },
76
+ "groups": 106,
77
+ "source_tier_counts": {
78
+ "pretrain": 106
79
+ }
80
+ },
81
+ "PickPlaceCounterToCabinet": {
82
+ "episode_split_counts": {
83
+ "test": 61,
84
+ "train": 488,
85
+ "validation": 61
86
+ },
87
+ "episodes": 610,
88
+ "group_split_counts": {
89
+ "test": 16,
90
+ "train": 134,
91
+ "validation": 12
92
+ },
93
+ "groups": 162,
94
+ "source_tier_counts": {
95
+ "pretrain": 108,
96
+ "target": 502
97
+ }
98
+ },
99
+ "PickPlaceCounterToMicrowave": {
100
+ "episode_split_counts": {
101
+ "test": 11,
102
+ "train": 88,
103
+ "validation": 11
104
+ },
105
+ "episodes": 110,
106
+ "group_split_counts": {
107
+ "test": 11,
108
+ "train": 86,
109
+ "validation": 11
110
+ },
111
+ "groups": 108,
112
+ "source_tier_counts": {
113
+ "pretrain": 110
114
+ }
115
+ },
116
+ "PickPlaceCounterToSink": {
117
+ "episode_split_counts": {
118
+ "test": 11,
119
+ "train": 86,
120
+ "validation": 11
121
+ },
122
+ "episodes": 108,
123
+ "group_split_counts": {
124
+ "test": 11,
125
+ "train": 83,
126
+ "validation": 11
127
+ },
128
+ "groups": 105,
129
+ "source_tier_counts": {
130
+ "pretrain": 108
131
+ }
132
+ },
133
+ "PickPlaceCounterToStove": {
134
+ "episode_split_counts": {
135
+ "test": 61,
136
+ "train": 487,
137
+ "validation": 61
138
+ },
139
+ "episodes": 609,
140
+ "group_split_counts": {
141
+ "test": 8,
142
+ "train": 93,
143
+ "validation": 23
144
+ },
145
+ "groups": 124,
146
+ "source_tier_counts": {
147
+ "pretrain": 108,
148
+ "target": 501
149
+ }
150
+ },
151
+ "PickPlaceMicrowaveToCounter": {
152
+ "episode_split_counts": {
153
+ "test": 11,
154
+ "train": 90,
155
+ "validation": 11
156
+ },
157
+ "episodes": 112,
158
+ "group_split_counts": {
159
+ "test": 10,
160
+ "train": 87,
161
+ "validation": 11
162
+ },
163
+ "groups": 108,
164
+ "source_tier_counts": {
165
+ "pretrain": 112
166
+ }
167
+ },
168
+ "PickPlaceSinkToCounter": {
169
+ "episode_split_counts": {
170
+ "test": 57,
171
+ "train": 487,
172
+ "validation": 65
173
+ },
174
+ "episodes": 609,
175
+ "group_split_counts": {
176
+ "test": 14,
177
+ "train": 101,
178
+ "validation": 1
179
+ },
180
+ "groups": 116,
181
+ "source_tier_counts": {
182
+ "pretrain": 108,
183
+ "target": 501
184
+ }
185
+ },
186
+ "PickPlaceStoveToCounter": {
187
+ "episode_split_counts": {
188
+ "test": 10,
189
+ "train": 87,
190
+ "validation": 12
191
+ },
192
+ "episodes": 109,
193
+ "group_split_counts": {
194
+ "test": 10,
195
+ "train": 87,
196
+ "validation": 11
197
+ },
198
+ "groups": 108,
199
+ "source_tier_counts": {
200
+ "pretrain": 109
201
+ }
202
+ },
203
+ "TurnOffStove": {
204
+ "episode_split_counts": {
205
+ "test": 28,
206
+ "train": 406,
207
+ "validation": 66
208
+ },
209
+ "episodes": 500,
210
+ "group_split_counts": {
211
+ "test": 1,
212
+ "train": 8,
213
+ "validation": 1
214
+ },
215
+ "groups": 10,
216
+ "source_tier_counts": {
217
+ "target": 500
218
+ }
219
+ },
220
+ "TurnOnMicrowave": {
221
+ "episode_split_counts": {
222
+ "test": 62,
223
+ "train": 423,
224
+ "validation": 58
225
+ },
226
+ "episodes": 543,
227
+ "group_split_counts": {
228
+ "test": 1,
229
+ "train": 8,
230
+ "validation": 1
231
+ },
232
+ "groups": 10,
233
+ "source_tier_counts": {
234
+ "target": 543
235
+ }
236
+ },
237
+ "TurnOnSinkFaucet": {
238
+ "episode_split_counts": {
239
+ "test": 22,
240
+ "train": 415,
241
+ "validation": 69
242
+ },
243
+ "episodes": 506,
244
+ "group_split_counts": {
245
+ "test": 1,
246
+ "train": 8,
247
+ "validation": 1
248
+ },
249
+ "groups": 10,
250
+ "source_tier_counts": {
251
+ "target": 506
252
+ }
253
+ }
254
+ }
255
+ }
training_splits/active13_gnn_v1/VERIFICATION.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "active_manifest_sha256": "bbc1d509a746b86e81dd07247b9ef721df39a7d82a44de6a3ec5247ecaa8cd2b",
3
+ "checks": {
4
+ "episode_identity_is_unique": true,
5
+ "every_task_has_train_validation_test": true,
6
+ "full_episode_identity_matches_active_manifest": true,
7
+ "materialized_rows_match_deterministic_recomputation": true,
8
+ "row_count_matches_active_manifest": true,
9
+ "source_group_cross_split_count_is_zero": true,
10
+ "source_tier_is_preserved": true
11
+ },
12
+ "cross_split_group_count": 0,
13
+ "episode_split_counts": {
14
+ "test": 450,
15
+ "train": 3943,
16
+ "validation": 544
17
+ },
18
+ "episodes": 4937,
19
+ "expected_split_manifest_sha256": "0235ea9e7f0d40fec616e62a4be92622c139cb2ff912e117b39edb7bc1651e80",
20
+ "group_split_counts": {
21
+ "test": 103,
22
+ "train": 852,
23
+ "validation": 101
24
+ },
25
+ "groups": 1056,
26
+ "held_out_scan_boundary": "graph_static and source ep_meta metadata only; no validation or test dynamic, node-state, mask, view-evidence, or visual-feature targets",
27
+ "schema": "gwam.active13.source_group_split_verification.v1",
28
+ "source_provenance_sha256": "78b16ba4fdbdd06235f65b51d9485aa3dbc05482c6b6ec12ee3c97f46c5d654c",
29
+ "split_manifest_sha256": "0235ea9e7f0d40fec616e62a4be92622c139cb2ff912e117b39edb7bc1651e80",
30
+ "status": "PASS",
31
+ "tasks": 13
32
+ }
training_splits/active13_gnn_v1/freeze_source_group_split.py ADDED
@@ -0,0 +1,396 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Freeze and verify the deterministic source-group split for the Active-13 view.
3
+
4
+ Only graph_static.json and the source ep_meta.json are read. Dynamic graph rows,
5
+ node-state arrays, masks, view evidence, and visual features remain unopened for
6
+ validation and test episodes.
7
+ """
8
+ from __future__ import annotations
9
+
10
+ import argparse
11
+ import hashlib
12
+ import json
13
+ import os
14
+ import zipfile
15
+ from collections import Counter, defaultdict
16
+ from pathlib import Path, PurePosixPath
17
+ from typing import Any, Iterable
18
+
19
+
20
+ SCHEMA = "gwam.active13.source_group_split.v1"
21
+ PROVENANCE_SCHEMA = "gwam.active13.source_group_provenance.v1"
22
+ VERIFICATION_SCHEMA = "gwam.active13.source_group_split_verification.v1"
23
+ SOURCE_TIERS = frozenset({"pretrain", "target"})
24
+ MODEL_SPLITS = ("train", "validation", "test")
25
+ GROUP_DEFINITION = "task + layout_id + style_id + ep_meta.fixture_refs"
26
+ ASSIGNMENT = "sha256 group order with cumulative episode midpoint at 0.8/0.9"
27
+
28
+
29
+ def _sha256_bytes(payload: bytes) -> str:
30
+ return hashlib.sha256(payload).hexdigest()
31
+
32
+
33
+ def _sha256_file(path: Path) -> str:
34
+ digest = hashlib.sha256()
35
+ with path.open("rb") as stream:
36
+ for chunk in iter(lambda: stream.read(1024 * 1024), b""):
37
+ digest.update(chunk)
38
+ return digest.hexdigest()
39
+
40
+
41
+ def _canonical_json_bytes(value: Any) -> bytes:
42
+ return json.dumps(
43
+ value, sort_keys=True, separators=(",", ":"), allow_nan=False
44
+ ).encode()
45
+
46
+
47
+ def read_jsonl(path: Path) -> list[dict[str, Any]]:
48
+ return [json.loads(line) for line in path.read_text().splitlines() if line.strip()]
49
+
50
+
51
+ def _jsonl_bytes(rows: Iterable[dict[str, Any]]) -> bytes:
52
+ return b"".join(_canonical_json_bytes(row) + b"\n" for row in rows)
53
+
54
+
55
+ def _immutable_write(path: Path, payload: bytes) -> None:
56
+ path.parent.mkdir(parents=True, exist_ok=True)
57
+ if path.exists():
58
+ if path.read_bytes() != payload:
59
+ raise FileExistsError(f"refusing to replace nonidentical frozen artifact: {path}")
60
+ return
61
+ temporary = path.with_suffix(path.suffix + ".tmp")
62
+ temporary.write_bytes(payload)
63
+ os.replace(temporary, path)
64
+
65
+
66
+ def _validate_active_row(row: dict[str, Any]) -> None:
67
+ required = {
68
+ "canonical_zip_path",
69
+ "canonical_zip_sha256",
70
+ "episode",
71
+ "episode_id",
72
+ "split",
73
+ "task",
74
+ }
75
+ missing = sorted(required - row.keys())
76
+ if missing:
77
+ raise ValueError(f"active manifest row is missing {missing}: {row!r}")
78
+ source_tier = str(row["split"])
79
+ task = str(row["task"])
80
+ episode_id = str(row["episode_id"])
81
+ if source_tier not in SOURCE_TIERS:
82
+ raise ValueError(f"invalid source tier {source_tier!r}")
83
+ expected_episode = f"{source_tier}/{task}/{episode_id}"
84
+ if row["episode"] != expected_episode:
85
+ raise ValueError(
86
+ f"episode identity mismatch: expected {expected_episode!r}, got {row['episode']!r}"
87
+ )
88
+ expected_zip = f"gwam_v12_sparse_v2/episodes/{expected_episode}.zip"
89
+ if row["canonical_zip_path"] != expected_zip:
90
+ raise ValueError(
91
+ f"canonical ZIP identity mismatch: expected {expected_zip!r}, "
92
+ f"got {row['canonical_zip_path']!r}"
93
+ )
94
+ relative = PurePosixPath(str(row["canonical_zip_path"]))
95
+ if relative.is_absolute() or ".." in relative.parts:
96
+ raise ValueError(f"unsafe canonical ZIP path: {relative}")
97
+ digest = str(row["canonical_zip_sha256"])
98
+ if len(digest) != 64 or any(character not in "0123456789abcdef" for character in digest):
99
+ raise ValueError(f"invalid canonical ZIP SHA256 for {expected_episode}")
100
+
101
+
102
+ def _source_factors(ep_meta: dict[str, Any]) -> tuple[dict[str, Any], str]:
103
+ fixture_refs_raw = ep_meta.get("fixture_refs", {})
104
+ if not isinstance(fixture_refs_raw, dict):
105
+ raise ValueError("ep_meta.fixture_refs must be an object")
106
+ fixture_refs = {
107
+ str(key): str(value) for key, value in sorted(fixture_refs_raw.items())
108
+ }
109
+ payload = {
110
+ "layout_id": ep_meta.get("layout_id"),
111
+ "style_id": ep_meta.get("style_id"),
112
+ "fixture_refs": fixture_refs,
113
+ }
114
+ # This intentionally matches collect_gwam_model_stats.py's frozen group hash.
115
+ digest = _sha256_bytes(_canonical_json_bytes(payload))
116
+ return payload, digest
117
+
118
+
119
+ def enrich_active_row(data_root: Path, row: dict[str, Any]) -> tuple[dict[str, Any], dict[str, Any]]:
120
+ _validate_active_row(row)
121
+ zip_path = data_root / PurePosixPath(str(row["canonical_zip_path"]))
122
+ if not zip_path.is_file():
123
+ raise FileNotFoundError(f"canonical ZIP is missing: {zip_path}")
124
+ with zipfile.ZipFile(zip_path) as archive:
125
+ members = [
126
+ name for name in archive.namelist() if name.endswith("/graph/graph_static.json")
127
+ ]
128
+ if len(members) != 1:
129
+ raise ValueError(f"expected one graph_static.json in {zip_path}, found {members}")
130
+ static_raw = archive.read(members[0])
131
+ static = json.loads(static_raw)
132
+ source_tier = str(row["split"])
133
+ task = str(row["task"])
134
+ episode_id = str(row["episode_id"])
135
+ if static.get("split") != source_tier or static.get("task") != task:
136
+ raise ValueError(f"graph_static identity mismatch for {row['episode']}")
137
+ episode_dir_raw = static.get("episode_dir")
138
+ if not episode_dir_raw:
139
+ raise ValueError(f"graph_static.episode_dir is unavailable for {row['episode']}")
140
+ ep_meta_path = Path(str(episode_dir_raw)) / "ep_meta.json"
141
+ if not ep_meta_path.is_file():
142
+ raise FileNotFoundError(f"source ep_meta.json is missing: {ep_meta_path}")
143
+ ep_meta = json.loads(ep_meta_path.read_text())
144
+ factor_payload, factor_hash = _source_factors(ep_meta)
145
+ enriched = {
146
+ "episode": str(row["episode"]),
147
+ "zip_path": str(row["canonical_zip_path"]),
148
+ "zip_sha256": str(row["canonical_zip_sha256"]),
149
+ "task": task,
150
+ "source_tier": source_tier,
151
+ "episode_id": episode_id,
152
+ "layout_style_fixture_hash": factor_hash,
153
+ "layout_id": factor_payload["layout_id"],
154
+ "style_id": factor_payload["style_id"],
155
+ }
156
+ provenance = {
157
+ "schema": PROVENANCE_SCHEMA,
158
+ "episode": str(row["episode"]),
159
+ "zip_path": str(row["canonical_zip_path"]),
160
+ "zip_sha256": str(row["canonical_zip_sha256"]),
161
+ "graph_static_member": members[0],
162
+ "graph_static_sha256": _sha256_bytes(_canonical_json_bytes(static)),
163
+ "ep_meta_sha256": _sha256_bytes(_canonical_json_bytes(ep_meta)),
164
+ "source_factor_payload_sha256": factor_hash,
165
+ "fixture_ref_count": len(factor_payload["fixture_refs"]),
166
+ }
167
+ return enriched, provenance
168
+
169
+
170
+ def assign_group_splits(
171
+ records: list[dict[str, Any]], seed: int = 20260728
172
+ ) -> tuple[list[dict[str, Any]], dict[str, Any]]:
173
+ by_task_group: dict[str, dict[str, list[dict[str, Any]]]] = defaultdict(
174
+ lambda: defaultdict(list)
175
+ )
176
+ seen_episodes: set[str] = set()
177
+ seen_zip_paths: set[str] = set()
178
+ for row in records:
179
+ episode = str(row["episode"])
180
+ zip_path = str(row["zip_path"])
181
+ if episode in seen_episodes or zip_path in seen_zip_paths:
182
+ raise ValueError(f"duplicate Active-13 identity: {episode} / {zip_path}")
183
+ seen_episodes.add(episode)
184
+ seen_zip_paths.add(zip_path)
185
+ group = str(row.get("layout_style_fixture_hash", ""))
186
+ if not group:
187
+ raise ValueError(f"missing source factor group for {zip_path}")
188
+ by_task_group[str(row["task"])][group].append(row)
189
+
190
+ output: list[dict[str, Any]] = []
191
+ task_summary: dict[str, Any] = {}
192
+ for task, groups in sorted(by_task_group.items()):
193
+ total = sum(len(group_rows) for group_rows in groups.values())
194
+ ordered_groups = sorted(
195
+ groups,
196
+ key=lambda group: _sha256_bytes(f"{seed}:{task}:{group}".encode()),
197
+ )
198
+ cumulative = 0
199
+ group_split: dict[str, str] = {}
200
+ for group in ordered_groups:
201
+ size = len(groups[group])
202
+ midpoint = (cumulative + size / 2) / total
203
+ model_split = (
204
+ "train" if midpoint < 0.8 else "validation" if midpoint < 0.9 else "test"
205
+ )
206
+ group_split[group] = model_split
207
+ cumulative += size
208
+ if set(group_split.values()) != set(MODEL_SPLITS):
209
+ raise ValueError(f"task {task} did not receive all three model splits")
210
+ for group, group_rows in groups.items():
211
+ for row in group_rows:
212
+ output.append(
213
+ {
214
+ "episode": row["episode"],
215
+ "zip_path": row["zip_path"],
216
+ "zip_sha256": row["zip_sha256"],
217
+ "task": task,
218
+ "source_tier": row["source_tier"],
219
+ "episode_id": row["episode_id"],
220
+ "model_split": group_split[group],
221
+ "source_group_id": f"{task}:{group}",
222
+ "layout_id": row.get("layout_id"),
223
+ "style_id": row.get("style_id"),
224
+ }
225
+ )
226
+ task_rows = [row for row in output if row["task"] == task]
227
+ task_summary[task] = {
228
+ "episodes": len(task_rows),
229
+ "groups": len(groups),
230
+ "episode_split_counts": dict(
231
+ sorted(Counter(row["model_split"] for row in task_rows).items())
232
+ ),
233
+ "group_split_counts": dict(sorted(Counter(group_split.values()).items())),
234
+ "source_tier_counts": dict(
235
+ sorted(Counter(row["source_tier"] for row in task_rows).items())
236
+ ),
237
+ }
238
+
239
+ output.sort(key=lambda row: row["episode"])
240
+ group_assignments: dict[str, set[str]] = defaultdict(set)
241
+ for row in output:
242
+ group_assignments[row["source_group_id"]].add(row["model_split"])
243
+ cross_split_groups = sorted(
244
+ group for group, splits in group_assignments.items() if len(splits) != 1
245
+ )
246
+ summary = {
247
+ "schema": SCHEMA,
248
+ "seed": seed,
249
+ "group_definition": GROUP_DEFINITION,
250
+ "assignment": ASSIGNMENT,
251
+ "tasks": task_summary,
252
+ "episodes": len(output),
253
+ "groups": len(group_assignments),
254
+ "episode_split_counts": dict(
255
+ sorted(Counter(row["model_split"] for row in output).items())
256
+ ),
257
+ "group_split_counts": dict(
258
+ sorted(
259
+ Counter(next(iter(splits)) for splits in group_assignments.values()).items()
260
+ )
261
+ ),
262
+ "source_tier_counts": dict(
263
+ sorted(Counter(row["source_tier"] for row in output).items())
264
+ ),
265
+ "cross_split_group_count": len(cross_split_groups),
266
+ "cross_split_group_examples": cross_split_groups[:10],
267
+ }
268
+ if cross_split_groups:
269
+ raise AssertionError(f"source groups cross model splits: {cross_split_groups[:10]}")
270
+ return output, summary
271
+
272
+
273
+ def verify_materialized_split(
274
+ active_rows: list[dict[str, Any]],
275
+ enriched_rows: list[dict[str, Any]],
276
+ materialized_rows: list[dict[str, Any]],
277
+ seed: int,
278
+ ) -> dict[str, Any]:
279
+ expected_rows, expected_summary = assign_group_splits(enriched_rows, seed=seed)
280
+ active_identities = {str(row["episode"]) for row in active_rows}
281
+ materialized_identities = {str(row["episode"]) for row in materialized_rows}
282
+ group_splits: dict[str, set[str]] = defaultdict(set)
283
+ for row in materialized_rows:
284
+ group_splits[str(row["source_group_id"])].add(str(row["model_split"]))
285
+ cross_split = sorted(group for group, splits in group_splits.items() if len(splits) != 1)
286
+ task_model_splits = {
287
+ task: sorted({str(row["model_split"]) for row in materialized_rows if row["task"] == task})
288
+ for task in sorted({str(row["task"]) for row in materialized_rows})
289
+ }
290
+ checks = {
291
+ "row_count_matches_active_manifest": len(materialized_rows) == len(active_rows),
292
+ "full_episode_identity_matches_active_manifest": materialized_identities == active_identities,
293
+ "episode_identity_is_unique": len(materialized_identities) == len(materialized_rows),
294
+ "materialized_rows_match_deterministic_recomputation": materialized_rows == expected_rows,
295
+ "source_group_cross_split_count_is_zero": not cross_split,
296
+ "every_task_has_train_validation_test": all(
297
+ model_splits == sorted(MODEL_SPLITS) for model_splits in task_model_splits.values()
298
+ ),
299
+ "source_tier_is_preserved": all(
300
+ row["episode"].split("/", 1)[0] == row["source_tier"]
301
+ for row in materialized_rows
302
+ ),
303
+ }
304
+ if not all(checks.values()):
305
+ failed = sorted(name for name, passed in checks.items() if not passed)
306
+ raise ValueError(f"Active-13 split verification failed: {failed}")
307
+ return {
308
+ "schema": VERIFICATION_SCHEMA,
309
+ "status": "PASS",
310
+ "checks": checks,
311
+ "episodes": len(materialized_rows),
312
+ "groups": len(group_splits),
313
+ "tasks": len(task_model_splits),
314
+ "cross_split_group_count": len(cross_split),
315
+ "episode_split_counts": expected_summary["episode_split_counts"],
316
+ "group_split_counts": expected_summary["group_split_counts"],
317
+ "held_out_scan_boundary": (
318
+ "graph_static and source ep_meta metadata only; no validation or test dynamic, "
319
+ "node-state, mask, view-evidence, or visual-feature targets"
320
+ ),
321
+ }
322
+
323
+
324
+ def main(argv: Iterable[str] | None = None) -> int:
325
+ parser = argparse.ArgumentParser(description=__doc__)
326
+ parser.add_argument("--active-manifest", type=Path, required=True)
327
+ parser.add_argument("--data-root", type=Path, required=True)
328
+ parser.add_argument("--output-manifest", type=Path, required=True)
329
+ parser.add_argument("--output-provenance", type=Path, required=True)
330
+ parser.add_argument("--summary", type=Path, required=True)
331
+ parser.add_argument("--verification", type=Path, required=True)
332
+ parser.add_argument("--seed", type=int, default=20260728)
333
+ parser.add_argument("--expected-sha256")
334
+ parser.add_argument("--progress-every", type=int, default=250)
335
+ args = parser.parse_args(list(argv) if argv is not None else None)
336
+
337
+ active_manifest = args.active_manifest.expanduser().resolve()
338
+ data_root = args.data_root.expanduser().resolve()
339
+ active_rows = read_jsonl(active_manifest)
340
+ enriched_rows: list[dict[str, Any]] = []
341
+ provenance_rows: list[dict[str, Any]] = []
342
+ for index, row in enumerate(active_rows, start=1):
343
+ enriched, provenance = enrich_active_row(data_root, row)
344
+ enriched_rows.append(enriched)
345
+ provenance_rows.append(provenance)
346
+ if args.progress_every > 0 and (index % args.progress_every == 0 or index == len(active_rows)):
347
+ print(f"metadata={index}/{len(active_rows)} {row['episode']}", flush=True)
348
+
349
+ materialized_rows, summary = assign_group_splits(enriched_rows, seed=args.seed)
350
+ provenance_rows.sort(key=lambda row: row["episode"])
351
+ manifest_payload = _jsonl_bytes(materialized_rows)
352
+ provenance_payload = _jsonl_bytes(provenance_rows)
353
+ manifest_sha256 = _sha256_bytes(manifest_payload)
354
+ provenance_sha256 = _sha256_bytes(provenance_payload)
355
+ if args.expected_sha256 and manifest_sha256 != args.expected_sha256:
356
+ raise ValueError(
357
+ f"split SHA256 mismatch: expected {args.expected_sha256}, got {manifest_sha256}"
358
+ )
359
+ _immutable_write(args.output_manifest.expanduser().resolve(), manifest_payload)
360
+ _immutable_write(args.output_provenance.expanduser().resolve(), provenance_payload)
361
+
362
+ reread_rows = read_jsonl(args.output_manifest.expanduser().resolve())
363
+ verification = verify_materialized_split(
364
+ active_rows, enriched_rows, reread_rows, seed=args.seed
365
+ )
366
+ summary.update(
367
+ {
368
+ "active_manifest_sha256": _sha256_file(active_manifest),
369
+ "split_manifest_sha256": manifest_sha256,
370
+ "source_provenance_sha256": provenance_sha256,
371
+ "source_metadata_rows": len(provenance_rows),
372
+ "held_out_scan_boundary": verification["held_out_scan_boundary"],
373
+ }
374
+ )
375
+ verification.update(
376
+ {
377
+ "active_manifest_sha256": _sha256_file(active_manifest),
378
+ "split_manifest_sha256": manifest_sha256,
379
+ "source_provenance_sha256": provenance_sha256,
380
+ "expected_split_manifest_sha256": args.expected_sha256,
381
+ }
382
+ )
383
+ _immutable_write(
384
+ args.summary.expanduser().resolve(),
385
+ json.dumps(summary, indent=2, sort_keys=True).encode() + b"\n",
386
+ )
387
+ _immutable_write(
388
+ args.verification.expanduser().resolve(),
389
+ json.dumps(verification, indent=2, sort_keys=True).encode() + b"\n",
390
+ )
391
+ print(json.dumps({"summary": summary, "verification": verification}, indent=2, sort_keys=True))
392
+ return 0
393
+
394
+
395
+ if __name__ == "__main__":
396
+ raise SystemExit(main())