ppak10 commited on
Commit
ae16a1b
·
1 Parent(s): 8a056e9

Adds 48 and labels.

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. CLAUDE.md +1 -0
  2. README.md +21 -0
  3. data/frames_index/048.parquet +3 -0
  4. data/peregrine/048.parquet +3 -0
  5. scripts/peregrine/01_extract.py +288 -0
  6. source/frames/048/bedmatrix/chunk-0001.zip +3 -0
  7. source/frames/048/bedmatrix/chunk-0002.zip +3 -0
  8. source/frames/048/bedmatrix/chunk-0003.zip +3 -0
  9. source/frames/048/bedmatrix/chunk-0004.zip +3 -0
  10. source/frames/048/chamber/chunk-0001.zip +3 -0
  11. source/frames/048/chamber/chunk-0002.zip +3 -0
  12. source/frames/048/chamber/chunk-0003.zip +3 -0
  13. source/frames/048/chamber/chunk-0004.zip +3 -0
  14. source/frames/048/chamber/chunk-0005.zip +3 -0
  15. source/frames/048/chamber/chunk-0006.zip +3 -0
  16. source/frames/048/chamber/chunk-0007.zip +3 -0
  17. source/frames/048/chamber/chunk-0008.zip +3 -0
  18. source/frames/048/chamber/chunk-0009.zip +3 -0
  19. source/frames/048/chamber/chunk-0010.zip +3 -0
  20. source/frames/048/chamber/chunk-0011.zip +3 -0
  21. source/frames/048/chamber/chunk-0012.zip +3 -0
  22. source/frames/048/chamber/chunk-0013.zip +3 -0
  23. source/frames/048/chamber/chunk-0014.zip +3 -0
  24. source/frames/048/chamber/chunk-0015.zip +3 -0
  25. source/frames/048/chamber/chunk-0016.zip +3 -0
  26. source/frames/048/chamber/chunk-0017.zip +3 -0
  27. source/frames/048/chamber/chunk-0018.zip +3 -0
  28. source/frames/048/chamber/chunk-0019.zip +3 -0
  29. source/frames/048/chamber/chunk-0020.zip +3 -0
  30. source/frames/048/chamber/chunk-0021.zip +3 -0
  31. source/frames/048/chamber/chunk-0022.zip +3 -0
  32. source/frames/048/chamber/chunk-0023.zip +3 -0
  33. source/frames/048/chamber/chunk-0024.zip +3 -0
  34. source/frames/048/chamber/chunk-0025.zip +3 -0
  35. source/frames/048/chamber/chunk-0026.zip +3 -0
  36. source/frames/048/chamber/chunk-0027.zip +3 -0
  37. source/frames/048/chamber/chunk-0028.zip +3 -0
  38. source/frames/048/chamber/chunk-0029.zip +3 -0
  39. source/frames/048/chamber/chunk-0030.zip +3 -0
  40. source/frames/048/chamber/chunk-0031.zip +3 -0
  41. source/frames/048/chamber/chunk-0032.zip +3 -0
  42. source/frames/048/chamber/chunk-0033.zip +3 -0
  43. source/frames/048/chamber/chunk-0034.zip +3 -0
  44. source/frames/048/chamber/chunk-0035.zip +3 -0
  45. source/frames/048/chamber/chunk-0036.zip +3 -0
  46. source/frames/048/chamber/chunk-0037.zip +3 -0
  47. source/frames/048/chamber/chunk-0038.zip +3 -0
  48. source/frames/048/chamber/chunk-0039.zip +3 -0
  49. source/frames/048/chamber/chunk-0040.zip +3 -0
  50. source/frames/048/chamber/chunk-0041.zip +3 -0
CLAUDE.md CHANGED
@@ -403,6 +403,7 @@ If `expand()` in the recorder ever changes, all of those column names change wit
403
  - `ticks` config: 26 parquet files across builds 001–046 (with gaps; 045 is an empty/aborted build with no telemetry, so no file). Build 041 was recovered from the NVMe spool after the Postgres DB was wiped. Builds 042–043 were added under the old offset scheme; builds 044 and 046 were added 2026-07-13 via **identity mapping** now that the DB realigned to 1:1 — see "Build ID mapping" below.
404
  - `print_profile_name` is preserved on every row; the `print_profile_id` UUID is *not* materialized here (see the architectural decision above).
405
  - `events` and `plotter_commands` not surfaced as configs.
 
406
  - **Forward-fill semantics deferred.** Current attach is "fresh frame within 100 ms of tick or null." Carrying the latest captured frame forward to fill null rows is left to consumers (one-line groupby + ffill); baking it into the dataset would destroy the fresh-vs-stale signal that's the whole point of keeping nulls.
407
  - `previews/` MP4s and timelapse GIFs: rendered through 046. Timelapse GIFs re-rendered 2026-07-13 with `CHAMBER_BRIGHTNESS_RATIO` raised 0.25 → 0.5 to drop dim-frame flashes.
408
 
 
403
  - `ticks` config: 26 parquet files across builds 001–046 (with gaps; 045 is an empty/aborted build with no telemetry, so no file). Build 041 was recovered from the NVMe spool after the Postgres DB was wiped. Builds 042–043 were added under the old offset scheme; builds 044 and 046 were added 2026-07-13 via **identity mapping** now that the DB realigned to 1:1 — see "Build ID mapping" below.
404
  - `print_profile_name` is preserved on every row; the `print_profile_id` UUID is *not* materialized here (see the architectural decision above).
405
  - `events` and `plotter_commands` not surfaced as configs.
406
+ - **`peregrine` config** (added 2026-07-19): sparse, defect-labeled counterpart to `ticks`, shaped like the ORNL Peregrine dataset — one row per *labeled layer*, `data/peregrine/{build:03d}.parquet`, built by `scripts/peregrine/01_extract.py` from `source/labels/` + `data/frames_index/` + `source/telemetry/`. Images are raw JPEG/PNG `binary` (post-recoat chamber = `image_after_powder`, post-scan chamber = `image_after_melt`, galvo = `part_mask`), labels are bbox-level `list<{class,bbox,polarity}>` + `has_<class>` bools + a few process scalars. Only re-runs the changed build (no full rewrite). Post-recoat vs post-scan stills are split by the z2 **step** preceding each label (z2 ramps monotonically to ~29 mm — it does NOT cycle to 0 per recoat; don't reuse the return-to-0 heuristic). Prereqs per build: `sls-export` + `sls-export-labels` + `sls-deliver-frames` must have run.
407
  - **Forward-fill semantics deferred.** Current attach is "fresh frame within 100 ms of tick or null." Carrying the latest captured frame forward to fill null rows is left to consumers (one-line groupby + ffill); baking it into the dataset would destroy the fresh-vs-stale signal that's the whole point of keeping nulls.
408
  - `previews/` MP4s and timelapse GIFs: rendered through 046. Timelapse GIFs re-rendered 2026-07-13 with `CHAMBER_BRIGHTNESS_RATIO` raised 0.25 → 0.5 to drop dim-frame flashes.
409
 
README.md CHANGED
@@ -13,6 +13,10 @@ configs:
13
  - split: train
14
  path: data/ticks/*.parquet
15
  default: true
 
 
 
 
16
  dataset_info:
17
  features:
18
  - name: frame_chamber
@@ -46,6 +50,23 @@ Full image bytes are embedded in each row — no separate frame download. Filter
46
  with_chamber = ds.filter(lambda r: r["frame_chamber"] is not None)
47
  ```
48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  ---
50
 
51
  ## Timelapse previews
 
13
  - split: train
14
  path: data/ticks/*.parquet
15
  default: true
16
+ - config_name: peregrine
17
+ data_files:
18
+ - split: train
19
+ path: data/peregrine/*.parquet
20
  dataset_info:
21
  features:
22
  - name: frame_chamber
 
50
  with_chamber = ds.filter(lambda r: r["frame_chamber"] is not None)
51
  ```
52
 
53
+ ## `peregrine` config — defect-labeled layers
54
+
55
+ A second, sparse config shaped like the [ORNL Peregrine dataset](https://huggingface.co/datasets/ppak10/Peregrine-Dataset-v2023-11): **one row per layer that carries a defect label**, for Peregrine-style transfer learning. Only labeled layers are recorded, so it's small and defect-focused (vs. the dense per-tick `ticks` config).
56
+
57
+ ```python
58
+ peregrine = load_dataset("ppak10/Agentic-SLS-Telemetry", "peregrine", split="train")
59
+ row = peregrine[0]
60
+ # row["image_after_powder"] → JPEG bytes, post-recoat chamber still (Peregrine after_powder)
61
+ # row["image_after_melt"] → JPEG bytes, post-scan chamber still (Peregrine after_melt)
62
+ # row["part_mask"] → PNG bytes, galvo scan mask (Peregrine part_ids)
63
+ # row["labels"] → list of {class, bbox [x0,y0,x1,y1] normalized, polarity}
64
+ # row["has_debris"], ... → bool per class (PEREGRINE_ALL_CLASSES)
65
+ # row["printBed_temp"], row["laser_power_w"], ... → process scalars at the layer
66
+ ```
67
+
68
+ Images are raw encoded bytes (`binary`, like Peregrine's `image_after_*`) — decode with `PIL.Image.open(io.BytesIO(...))`. Labels are bbox-level (from the live defect detector / operator verdicts), not per-pixel masks; `polarity` is `positive` (defect present) or `negative` (operator marked the alert a false positive). One parquet per build (`data/peregrine/{build:03d}.parquet`), so a new build never rewrites existing files.
69
+
70
  ---
71
 
72
  ## Timelapse previews
data/frames_index/048.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:74c590ce7d6baba89d05e6f5d0031208a6ec72775070f3a9a38fe40d124e14b0
3
+ size 11921770
data/peregrine/048.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a042a2865bedd9a0665f822425022c30ffd819bb1b8aa9778a1e1231485bd796
3
+ size 297105
scripts/peregrine/01_extract.py ADDED
@@ -0,0 +1,288 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Build the `peregrine` config: one row per LABELED layer per build, shaped
3
+ like the ORNL Peregrine dataset (ppak10/Peregrine-Dataset-v2023-11).
4
+
5
+ Only layers that carry at least one *active* defect label are emitted — this is
6
+ the sparse, defect-focused counterpart to the dense `ticks` config, meant for
7
+ Peregrine-style transfer learning. Frames are recorded ONLY for labeled layers.
8
+
9
+ Per-build output `data/peregrine/{build_id:03d}.parquet` (zero-padded) so a new
10
+ build only writes its own file — existing builds are never rewritten.
11
+
12
+ Reads from this dataset's own source/ tree + built frame index:
13
+ source/labels/{build}.parquet curated active labels (sls-export-labels)
14
+ data/frames_index/{build}.parquet ts_ms -> (archive zip, member) per frame
15
+ source/telemetry/{build}.parquet z2 (recoat boundary) + process scalars
16
+ source/recorder/builds.jsonl build_name
17
+
18
+ Schema (Peregrine-aligned; images are raw JPEG bytes as `binary`, exactly like
19
+ Peregrine's image_after_* columns — decode with PIL.Image.open(io.BytesIO(x))):
20
+ build, build_name, layer, ts
21
+ image_after_powder post-recoat chamber still (Peregrine after_powder)
22
+ image_after_melt post-scan chamber still (Peregrine after_melt)
23
+ part_mask galvo scan mask (Peregrine part_ids analog)
24
+ labels list<{class, bbox[x0,y0,x1,y1] normalized, polarity}>
25
+ has_<class> bool per PEREGRINE_ALL_CLASSES (12)
26
+ <sensor>_temp / laser_power_w process scalars nearest-before the layer ts
27
+
28
+ Frame selection per labeled layer (anchor = earliest label ts on the layer):
29
+ after_melt = chamber frame nearest the anchor ts (the detection frame)
30
+ after_powder = first chamber frame after the recoat that precedes the anchor
31
+ (z2 returns to 0 = recoat complete); null if none resolved
32
+ part_mask = galvo frame nearest the anchor ts
33
+
34
+ Usage:
35
+ uv run scripts/peregrine/01_extract.py # all builds with labels
36
+ uv run scripts/peregrine/01_extract.py 48 # specific build ids
37
+ """
38
+ import io
39
+ import sys
40
+ import zipfile
41
+ from pathlib import Path
42
+
43
+ import polars as pl
44
+ import pyarrow as pa
45
+ import pyarrow.parquet as pq
46
+
47
+ sys.path.insert(0, str(Path(__file__).parent.parent))
48
+ from _lib import DATA_DIR, SOURCE_DIR, TELEMETRY_DIR, EXPORTS_DIR, iter_jsonl
49
+
50
+ LABELS_DIR = SOURCE_DIR / "labels"
51
+ FRAMES_INDEX_DIR = DATA_DIR / "frames_index"
52
+ OUTPUT_DIR = DATA_DIR / "peregrine"
53
+
54
+ # Bit-position order shared with the defect model (runs/*/constants.py).
55
+ PEREGRINE_ALL_CLASSES = [
56
+ "powder", "printed", "recoater_hopping", "recoater_streaking",
57
+ "incomplete_spreading", "swelling", "debris", "super_elevation",
58
+ "spatter", "misprint", "over_melting", "under_melting",
59
+ ]
60
+
61
+ # Process scalars: (output column, telemetry kind, sensor_id | None for single-sensor).
62
+ SCALAR_SPECS = [
63
+ ("printBed_temp", "temp.current", "printBed"),
64
+ ("printChamber_temp", "temp.current", "printChamber1"),
65
+ ("powderBed_temp", "temp.current", "powderBed"),
66
+ ("surface_temp", "temp.current", "surface"),
67
+ ("laser_power_w", "power.current", None),
68
+ ]
69
+
70
+ LABEL_STRUCT = pa.struct([
71
+ pa.field("class", pa.string()),
72
+ pa.field("bbox", pa.list_(pa.float64())),
73
+ pa.field("polarity", pa.string()),
74
+ ])
75
+
76
+ OUTPUT_SCHEMA = pa.schema(
77
+ [
78
+ pa.field("build", pa.int64()),
79
+ pa.field("build_name", pa.string()),
80
+ pa.field("layer", pa.int32()),
81
+ pa.field("ts", pa.timestamp("us", tz="UTC")),
82
+ pa.field("image_after_powder", pa.binary()),
83
+ pa.field("image_after_melt", pa.binary()),
84
+ pa.field("part_mask", pa.binary()),
85
+ pa.field("labels", pa.list_(LABEL_STRUCT)),
86
+ ]
87
+ + [pa.field(f"has_{c}", pa.bool_()) for c in PEREGRINE_ALL_CLASSES]
88
+ + [pa.field(name, pa.float64()) for name, _, _ in SCALAR_SPECS]
89
+ )
90
+
91
+
92
+ def _build_name(build_id: int) -> str | None:
93
+ for r in iter_jsonl(EXPORTS_DIR / "builds.jsonl"):
94
+ if r.get("id") == build_id:
95
+ return r.get("job_name")
96
+ return None
97
+
98
+
99
+ class FrameStore:
100
+ """Resolve chamber/galvo JPEG bytes by nearest / first-after timestamp.
101
+
102
+ Reads the built frame index (ts_ms -> archive zip + member) and lazily opens
103
+ the store-mode zip chunks, caching handles (a labeled build touches only a
104
+ handful of chunks).
105
+ """
106
+
107
+ def __init__(self, build_id: int):
108
+ fi = pl.read_parquet(FRAMES_INDEX_DIR / f"{build_id:03d}.parquet")
109
+ self._by_kind = {}
110
+ for kind in ("chamber", "galvo"):
111
+ k = fi.filter(pl.col("kind") == kind).sort("ts_ms")
112
+ self._by_kind[kind] = {
113
+ "ts": k["ts_ms"].to_numpy(),
114
+ "archive": k["archive"].to_list(),
115
+ "member": k["member"].to_list(),
116
+ }
117
+ self._zips: dict[str, zipfile.ZipFile] = {}
118
+
119
+ def _read(self, kind: str, idx: int) -> bytes:
120
+ k = self._by_kind[kind]
121
+ archive = k["archive"][idx]
122
+ zf = self._zips.get(archive)
123
+ if zf is None:
124
+ zf = self._zips[archive] = zipfile.ZipFile(archive)
125
+ return zf.read(k["member"][idx])
126
+
127
+ def nearest(self, kind: str, ts_ms: int) -> bytes | None:
128
+ ts = self._by_kind[kind]["ts"]
129
+ if len(ts) == 0:
130
+ return None
131
+ import numpy as np
132
+ i = int(np.searchsorted(ts, ts_ms))
133
+ cands = [j for j in (i - 1, i) if 0 <= j < len(ts)]
134
+ best = min(cands, key=lambda j: abs(int(ts[j]) - ts_ms))
135
+ return self._read(kind, best)
136
+
137
+ def first_in(self, kind: str, lo_ms: int, hi_ms: int) -> bytes | None:
138
+ """First frame with lo <= ts <= hi (chronological), else None."""
139
+ ts = self._by_kind[kind]["ts"]
140
+ if len(ts) == 0:
141
+ return None
142
+ import numpy as np
143
+ i = int(np.searchsorted(ts, lo_ms, side="left"))
144
+ if i < len(ts) and int(ts[i]) <= hi_ms:
145
+ return self._read(kind, i)
146
+ return None
147
+
148
+ def close(self):
149
+ for zf in self._zips.values():
150
+ zf.close()
151
+
152
+
153
+ # z2 is the build piston: it steps once per deposited layer (Peregrine
154
+ # "z2 advances once per deposited layer") and ramps monotonically to ~29 mm over
155
+ # the build — it does NOT cycle back to 0 per recoat. A layer/recoat boundary is
156
+ # therefore a STEP in z2; the ts the step settles ~= the post-recoat moment.
157
+ Z2_STEP_MIN = 1.0 # ignore sub-unit sensor jitter
158
+
159
+
160
+ def _recoat_boundaries_ms(tel: pl.DataFrame):
161
+ """ts_ms at each z2 step (recoat/layer boundary). Sorted ascending."""
162
+ z2 = (
163
+ tel.filter(pl.col("kind") == "position.z2")
164
+ .select("ts", "value")
165
+ .sort("ts")
166
+ .with_columns(ts_ms=pl.col("ts").dt.epoch(time_unit="ms"))
167
+ )
168
+ if z2.is_empty():
169
+ return []
170
+ z2 = z2.with_columns(step=(pl.col("value") - pl.col("value").shift(1)).abs())
171
+ steps = z2.filter(pl.col("step") >= Z2_STEP_MIN)
172
+ return steps["ts_ms"].to_list()
173
+
174
+
175
+ def _scalar_series(tel: pl.DataFrame):
176
+ """{output_col: (ts_ms ndarray, value ndarray)} for nearest-before lookup."""
177
+ import numpy as np
178
+ out = {}
179
+ for name, kind, sensor in SCALAR_SPECS:
180
+ sel = tel.filter(pl.col("kind") == kind)
181
+ if sensor is not None:
182
+ sel = sel.filter(pl.col("sensor_id") == sensor)
183
+ sel = sel.select("ts", "value").sort("ts")
184
+ out[name] = (
185
+ sel["ts"].dt.epoch(time_unit="ms").to_numpy(),
186
+ sel["value"].to_numpy(),
187
+ ) if not sel.is_empty() else (np.array([]), np.array([]))
188
+ return out
189
+
190
+
191
+ def _scalar_at(series, ts_ms: int) -> float | None:
192
+ import numpy as np
193
+ ts, val = series
194
+ if len(ts) == 0:
195
+ return None
196
+ i = int(np.searchsorted(ts, ts_ms, side="right")) - 1 # nearest-before
197
+ if i < 0:
198
+ i = 0 # label before first sample: take earliest
199
+ return float(val[i])
200
+
201
+
202
+ def process_build(build_id: int) -> Path | None:
203
+ labels_path = LABELS_DIR / f"{build_id:03d}.parquet"
204
+ fi_path = FRAMES_INDEX_DIR / f"{build_id:03d}.parquet"
205
+ tel_path = TELEMETRY_DIR / f"{build_id:03d}.parquet"
206
+ if not labels_path.exists():
207
+ return None
208
+ labels = pl.read_parquet(labels_path)
209
+ if labels.is_empty():
210
+ return None
211
+ if not fi_path.exists() or not tel_path.exists():
212
+ print(f" build {build_id}: labels present but frames_index/telemetry "
213
+ f"missing — run sls-deliver-frames + sls-export first; skipped")
214
+ return None
215
+
216
+ tel = pl.read_parquet(tel_path)
217
+ frames = FrameStore(build_id)
218
+ boundaries = _recoat_boundaries_ms(tel)
219
+ scalars = _scalar_series(tel)
220
+ build_name = _build_name(build_id)
221
+
222
+ import numpy as np
223
+ bnd = np.array(boundaries, dtype="int64")
224
+
225
+ rows: list[dict] = []
226
+ # One row per labeled layer; anchor = earliest label ts on that layer.
227
+ for (layer,), grp in labels.sort("ts").group_by(["layer"], maintain_order=True):
228
+ grp = grp.sort("ts")
229
+ anchor_ts_ms = int(grp["ts"].dt.epoch(time_unit="ms")[0])
230
+
231
+ label_list = [
232
+ {"class": r["class"], "bbox": list(r["bbox"]), "polarity": r["polarity"]}
233
+ for r in grp.iter_rows(named=True)
234
+ ]
235
+ present = {lbl["class"] for lbl in label_list}
236
+
237
+ # after_powder: first chamber after the recoat that precedes the anchor.
238
+ lo = int(bnd[np.searchsorted(bnd, anchor_ts_ms, side="right") - 1]) \
239
+ if len(bnd) and bnd[0] <= anchor_ts_ms else None
240
+ after_powder = frames.first_in("chamber", lo, anchor_ts_ms) if lo is not None else None
241
+
242
+ row = {
243
+ "build": build_id,
244
+ "build_name": build_name,
245
+ "layer": int(layer),
246
+ "ts": grp["ts"][0],
247
+ "image_after_powder": after_powder,
248
+ "image_after_melt": frames.nearest("chamber", anchor_ts_ms),
249
+ "part_mask": frames.nearest("galvo", anchor_ts_ms),
250
+ "labels": label_list,
251
+ }
252
+ for c in PEREGRINE_ALL_CLASSES:
253
+ row[f"has_{c}"] = c in present
254
+ for name, _, _ in SCALAR_SPECS:
255
+ row[name] = _scalar_at(scalars[name], anchor_ts_ms)
256
+ rows.append(row)
257
+
258
+ frames.close()
259
+ rows.sort(key=lambda r: r["layer"])
260
+
261
+ table = pa.Table.from_pylist(rows, schema=OUTPUT_SCHEMA)
262
+ OUTPUT_DIR.mkdir(parents=True, exist_ok=True)
263
+ out_path = OUTPUT_DIR / f"{build_id:03d}.parquet"
264
+ pq.write_table(table, out_path, compression="zstd")
265
+ print(f" build {build_id}: {len(rows)} labeled layer(s) -> "
266
+ f"{out_path.relative_to(DATA_DIR.parent)}")
267
+ return out_path
268
+
269
+
270
+ def _builds_with_labels() -> list[int]:
271
+ return sorted(int(p.stem) for p in LABELS_DIR.glob("*.parquet"))
272
+
273
+
274
+ def main():
275
+ args = sys.argv[1:]
276
+ builds = [int(a) for a in args] if args else _builds_with_labels()
277
+ if not builds:
278
+ print("no builds with source/labels/*.parquet found")
279
+ return
280
+ written = 0
281
+ for b in builds:
282
+ if process_build(b) is not None:
283
+ written += 1
284
+ print(f"done: {written} build(s) written to {OUTPUT_DIR.relative_to(DATA_DIR.parent)}")
285
+
286
+
287
+ if __name__ == "__main__":
288
+ main()
source/frames/048/bedmatrix/chunk-0001.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f8508aecc462755e891d3753ce3d7c0127a56debf852564f44a3afcb42cf526f
3
+ size 77472472
source/frames/048/bedmatrix/chunk-0002.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:decdfc65137829a0d48f0692d1a5a02cb857b786758939b0a087e8890c885094
3
+ size 77573417
source/frames/048/bedmatrix/chunk-0003.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:12b278571e55e8048fce3ba9ebbcf7097577669cd08c853963631b188ac496cf
3
+ size 76835388
source/frames/048/bedmatrix/chunk-0004.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:81d0cc1bdfb1cd9d19975090bb8cc6b83be03f6d772a770f57a48350005cae50
3
+ size 13957335
source/frames/048/chamber/chunk-0001.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fb95b3310e30f942dc00bf51882d742fe269316ab365a356e3ab2d0fede2694b
3
+ size 134403597
source/frames/048/chamber/chunk-0002.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:63784492974846682ac16aaddfc40fd3f6c7bd7d306d264a1525ab692a326354
3
+ size 185728129
source/frames/048/chamber/chunk-0003.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4acbf7d6ffc9b3df7e8a911b965edb6f38d0bc949ad780bc57dde599a842a460
3
+ size 260338309
source/frames/048/chamber/chunk-0004.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:40d93324e8dd295fa4cf1edea81b5e0dc52a03e21c986def06217ddcc4dcf3b5
3
+ size 201703054
source/frames/048/chamber/chunk-0005.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1b341f7503d8d27f04969beac2d5696a31e5f01ddc7e7144ab6fa262e0885d4f
3
+ size 170912886
source/frames/048/chamber/chunk-0006.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:39914a6c87f58c30a3ed54bc7469ebdd45250d1cb330c8b9a171f6a2cd51beb4
3
+ size 181402330
source/frames/048/chamber/chunk-0007.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:27ad0209becdce6fe9b27122bdf0ccac23debe620a9d176dd42e80ed12a5e525
3
+ size 359260741
source/frames/048/chamber/chunk-0008.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3e61f4e948889e625ca7a40604794b4d6f6fd9122fc66a6c350ec39dffb08c08
3
+ size 369032241
source/frames/048/chamber/chunk-0009.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:606e90f6ef28d04704b88acaf13d92bf40d993aded3780ccb4e6b667b672f618
3
+ size 341096007
source/frames/048/chamber/chunk-0010.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1a823661843d7b25d3198b2b3a5f512a2eb73e01e1bc30428f792fc85bb5d17b
3
+ size 322441292
source/frames/048/chamber/chunk-0011.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6effa9a18c3af211ee46f419939eb36fb82c6e28a67b7ae0af0ef7e4c26aa835
3
+ size 308656549
source/frames/048/chamber/chunk-0012.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6ba9cd7d9465cf646eb8c7a72a45ebf61d393687589318acb7de898a8eedd9d7
3
+ size 296205156
source/frames/048/chamber/chunk-0013.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6e981f566d1d4f1d7f07b7a2f408d494a2b1e8dcad9e47ff10cc16541398f145
3
+ size 287006947
source/frames/048/chamber/chunk-0014.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:73b5619bfa27aca9b1d978c1d2c62f04955363da24fb6f0a587cf5e439938f8d
3
+ size 294345999
source/frames/048/chamber/chunk-0015.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d6e3616f10c684e519ab9166a141444107a504f6dedef09cad31cac91d6be48a
3
+ size 281858094
source/frames/048/chamber/chunk-0016.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:56cd26a6db4afd3a15fed5e924f111dcfd8f7e84c7a545cf9084d7098f14380d
3
+ size 293834813
source/frames/048/chamber/chunk-0017.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0f4609988a94cc146ecd1231560509f3a44512b9926d1fedebd2d94bc2d162d6
3
+ size 289192869
source/frames/048/chamber/chunk-0018.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:65b2b4dd3893d343861d334f8ef69abc50fef485d8b1ce48a57ce885bbbb21f5
3
+ size 292875467
source/frames/048/chamber/chunk-0019.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8b7c5c5a48403dcffaff867a6bfeb598e39eea62aa26ee674cd738add202bc23
3
+ size 278927648
source/frames/048/chamber/chunk-0020.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:43f66fce06790ce7724383f6bfbb619518538a05325e5e991d5e493d3c5bcb50
3
+ size 267133445
source/frames/048/chamber/chunk-0021.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:89c552e1dc40eb3913d6add3eb17fdb729244d979d22b7c80305edb9829b4d97
3
+ size 256817075
source/frames/048/chamber/chunk-0022.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e40252f4c2b39263c72f4a8a829e0026118ecb767f9915e8550e8b31e4f45e90
3
+ size 261536454
source/frames/048/chamber/chunk-0023.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3002d93b2b45a8ed10ff65a157d8c05dd198e0ca7714a197ffee19bec3dfbec6
3
+ size 264777577
source/frames/048/chamber/chunk-0024.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:99d21575e64ca440d48a206a80e32a1f8a08b9797b033b099ca72d669cee18ab
3
+ size 236413809
source/frames/048/chamber/chunk-0025.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:47dab96f15dc6fd638b094f36da16550270264a1a0140899cf2be44cf587a968
3
+ size 165659490
source/frames/048/chamber/chunk-0026.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:146b48589a7adcd47f18a1395d59173cc67a31107cbb3cf9ecc1a2740ddd9d8d
3
+ size 144001218
source/frames/048/chamber/chunk-0027.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5453e6de7f6f01c118c192e3f9bfa318e7bc7ba945f0191b1dd106e2334f6f35
3
+ size 135591769
source/frames/048/chamber/chunk-0028.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f87d8c6c2c0b6feb83257fc178d73d4a178a88ea1d78484ac9fe91617addd4c4
3
+ size 136626799
source/frames/048/chamber/chunk-0029.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2745449bcda81a4d7d959a59b31fde9cffa1a7f5542f19e508592dfc99d82446
3
+ size 136946721
source/frames/048/chamber/chunk-0030.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9b3786305d864cd342bd81413eaf8c111d0a389de999ba9709d5441c2363c272
3
+ size 141278095
source/frames/048/chamber/chunk-0031.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3aa74ca0d9591531e9d85e2a4a6b90e13647dba8d80471ff0d5c31ca15b1965d
3
+ size 158369973
source/frames/048/chamber/chunk-0032.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:84a68eb85e10cc8d259e538b532fe8d3fd9d97c48901be6888cfa159fd9c806f
3
+ size 155088754
source/frames/048/chamber/chunk-0033.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:33f4052e26086a7a7329f3ab1e9e5bd50e84a6e18a7cef629a3e1d626754c42a
3
+ size 155711147
source/frames/048/chamber/chunk-0034.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d33b03a70ac38b2045a079316d9ab8c199ce9cf2ebba5f8f3a2b772bee2c239c
3
+ size 154959760
source/frames/048/chamber/chunk-0035.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b0ac0b69a361a7ffc6beb332e62e69e89f0f6ef6b7c0b5014fb26b71c376cbce
3
+ size 155793866
source/frames/048/chamber/chunk-0036.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8a71a7de6edde7d884bdc2fb960b436bf4c04b8d8c4a93c550000f0dca4f5cac
3
+ size 157849384
source/frames/048/chamber/chunk-0037.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:41e5bc75c22bc1c65d48a05a4901a2ddd660236b1ff8c36858904e2ea3743f77
3
+ size 153336186
source/frames/048/chamber/chunk-0038.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f30af4e7a2fb01247f79e06dad5f7bf78c918ae43309226b39f1f933d4bb3e6b
3
+ size 140372055
source/frames/048/chamber/chunk-0039.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a18b229a32a314e726269db7eca242804675b4483fc5180c104b1fabdc1c7abf
3
+ size 159807420
source/frames/048/chamber/chunk-0040.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d8364409159df4705976aeead50e23b62c8fccb439f44c5b9e71aac10ac92e1f
3
+ size 157185104
source/frames/048/chamber/chunk-0041.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0fee80f1946394ad4c3a9f7879981e97570729fe61a1a458d066e38a762d4a2a
3
+ size 160010630