Adds initial data.
Browse files- .gitignore +3 -0
- .python-version +1 -0
- CLAUDE.md +124 -0
- README.md +77 -0
- data/ticks/1.parquet +3 -0
- data/ticks/12.parquet +3 -0
- data/ticks/13.parquet +3 -0
- data/ticks/14.parquet +3 -0
- data/ticks/16.parquet +3 -0
- data/ticks/17.parquet +3 -0
- data/ticks/2.parquet +3 -0
- data/ticks/25.parquet +3 -0
- data/ticks/26.parquet +3 -0
- data/ticks/28.parquet +3 -0
- pyproject.toml +10 -0
- scripts/_lib.py +80 -0
- scripts/ticks/01_extract.py +193 -0
- uv.lock +82 -0
.gitignore
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
__pycache__/
|
| 2 |
+
*.py[cod]
|
| 3 |
+
.venv/
|
.python-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
3.13
|
CLAUDE.md
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# CLAUDE.md
|
| 2 |
+
|
| 3 |
+
Context for continuing work on this dataset. Captures the design decisions and conventions worked out so far.
|
| 4 |
+
|
| 5 |
+
## What this dataset is
|
| 6 |
+
|
| 7 |
+
`Inova-Mk1-Telemetry` is the **tick-anchored printer-state dataset**: one row per 10 Hz recorder tick, with the full sensor snapshot (~64 columns: temperatures, position, power, lights) on every row, the nearest camera frame paths attached when one fell in the prior 100 ms window, and 1 kHz `position_hf` events from that window collected as a per-tick list.
|
| 8 |
+
|
| 9 |
+
It is the **third leaf** in the Inova Mk1 dataset ecosystem alongside `Inova-Mk1-Database` (canonical printer entities) and `Inova-Mk1-ASTM` (mechanical-test specimens).
|
| 10 |
+
|
| 11 |
+
Unlike the other two, this dataset has **no local `source/` directory** — its raw inputs are the flat exports written by the sibling recorder repo (`Agentic-Additive-Manufacturing-Process-Optimization`). The ETL here reshapes those flat exports into one parquet file per build.
|
| 12 |
+
|
| 13 |
+
## Ecosystem
|
| 14 |
+
|
| 15 |
+
- **Upstream recorder repo**: `Agentic-Additive-Manufacturing-Process-Optimization` — a TypeScript + Python project that polls the Inova plugin's REST API and WS streams and writes to a local Postgres + image files on disk. Its `scripts/export.py` dumps the tables to flat files under `data/exports/`.
|
| 16 |
+
- Authoritative source for sensor semantics: `sls4all/Inova-API-Plugin/InovaApiPlugin.cs` (the `/state/snapshot` endpoint) and `server/src/recorder/telemetry.ts` (the `expand()` function that explodes one snapshot into the deterministic ~64 telemetry rows).
|
| 17 |
+
- **Upstream graph dataset**: `ppak10/Inova-Mk1-Database` — print jobs, sessions, profiles, objects. Used here only as a join target via `print_profile_id`.
|
| 18 |
+
- **Sibling domain dataset**: `ppak10/Inova-Mk1-ASTM` — mechanical-test specimens. No direct relationship.
|
| 19 |
+
|
| 20 |
+
## Architectural decisions
|
| 21 |
+
|
| 22 |
+
- **One config, not four.** Early iteration had separate `builds`, `telemetry`, `position_hf`, and `frames` configs. Replaced with a single `ticks` config because ML consumers almost always want the joined view: state + frame + position at one moment in time. The four-silo version pushed the join cost onto every downstream user.
|
| 23 |
+
- **Anchor on the 10 Hz telemetry tick, not strict outer join.** The recorder's `/state/snapshot` poll fires at 10 Hz and emits a deterministic ~64-row burst into the `telemetry` table — so a tick already represents a full state snapshot. Anchoring on ticks gives every row densely populated columns; frames and `position_hf` attach to the tick they're closest to. A strict outer join across all stream timestamps gave ~3M mostly-sparse rows for less ML value.
|
| 24 |
+
- **Wide format, dotted column names matching upstream.** Sensor columns are named exactly `{sensor_id}.{kind}` — e.g. `powderBed.temp.current`, `laser.power`, `positions.position.x`. This matches the upstream `sensors.csv` glossary 1:1 so unit annotations land where consumers will look. ~64 sensor columns + build context + frame paths + position burst = 78 columns total.
|
| 25 |
+
- **Frames attach by nearest-before-tick within a 100 ms window.** Frame timestamps don't align with telemetry ticks (chamber 5 Hz, thermal 2 Hz, galvo varies). For each tick we look back 100 ms and grab the most recent frame of each kind; nulls when nothing landed. `frame_chamber`, `frame_galvo`, `frame_thermal` as separate nullable string columns.
|
| 26 |
+
- **`position_hf` preserved as per-tick bursts.** The firmware emits `PositionChangedHighFrequency` event-driven, not at fixed 1 kHz — so it bursts during motion and is empty during heating. We keep the full burst inside each tick's window as `position_hf_burst: list<struct<ts_offset_ms, x, y, z1, z2, r, has_homed>>`. Empty list when no motion. Lossless within the 100 ms window; the raw `position_hf/{build_id}.parquet` upstream is the fallback if you need motion data between ticks.
|
| 27 |
+
- **Build context denormalized into every row.** `build_id`, `job_name`, `started_at`, `ended_at`, `phase`, `print_profile_id`, `print_profile_name`, `inova_session_id` repeat on every row. Parquet dictionary encoding makes this essentially free (~1 byte per row regardless of value).
|
| 28 |
+
- **One parquet file per build.** `data/ticks/{build_id}.parquet`. HF globs `data/ticks/*.parquet` to load the full dataset. Builds without telemetry produce no file; consumers should expect missing build IDs.
|
| 29 |
+
- **Polars for the pivot + asof joins.** ~22 M telemetry rows (build 26) pivot to ~355 K ticks in seconds. Polars' `pivot` and `join_asof(tolerance=100ms)` do the heavy lifting; the position_hf burst is a manual sorted-merge.
|
| 30 |
+
|
| 31 |
+
## Directory layout
|
| 32 |
+
|
| 33 |
+
```
|
| 34 |
+
.python-version # 3.13
|
| 35 |
+
pyproject.toml # pyarrow, polars
|
| 36 |
+
|
| 37 |
+
scripts/
|
| 38 |
+
_lib.py # sibling-repo paths, FK resolver
|
| 39 |
+
ticks/01_extract.py # the single ETL — wide-pivot + asof + burst attach
|
| 40 |
+
|
| 41 |
+
data/
|
| 42 |
+
ticks/{build_id}.parquet # LFS (parquet pattern in .gitattributes)
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
There is no `source/` (raw data lives in the sibling recorder repo's `data/exports/`).
|
| 46 |
+
|
| 47 |
+
## Row shape
|
| 48 |
+
|
| 49 |
+
```python
|
| 50 |
+
# per row, ~78 columns:
|
| 51 |
+
{
|
| 52 |
+
# Build context (denormalized; same on every row of a given file)
|
| 53 |
+
"build_id": 26,
|
| 54 |
+
"ts": datetime(2026, 6, 2, 21, 16, 53, 936, tzinfo=UTC),
|
| 55 |
+
"job_name": "D790 and D638 and Benchy 2026_06_02",
|
| 56 |
+
"started_at": "...", "ended_at": "...",
|
| 57 |
+
"phase": "Heating",
|
| 58 |
+
"print_profile_id": "feafe2b0-...",
|
| 59 |
+
"print_profile_name": "2026_05_30 20mJ/mm Formlabs PA12 GF",
|
| 60 |
+
"inova_session_id": None, # filled when upstream CSV is curated
|
| 61 |
+
|
| 62 |
+
# Position (microns, firmware native) — always present
|
| 63 |
+
"positions.position.x": ..., "positions.position.y": ...,
|
| 64 |
+
"positions.position.z1": ..., "positions.position.z2": ...,
|
| 65 |
+
"positions.position.r": ...,
|
| 66 |
+
|
| 67 |
+
# Lights
|
| 68 |
+
"lights.lights.enabled": 0.0,
|
| 69 |
+
"lights.lights.count": 4.0,
|
| 70 |
+
|
| 71 |
+
# Power (W) — ~9 columns
|
| 72 |
+
"laser.power": 1140.0, "fanGalvo.power": ..., "buzzer.power": ...,
|
| 73 |
+
"powerman.power.current": 1140.0, "powerman.power.required": 1540.0,
|
| 74 |
+
"powerman.power.max": 1300.0,
|
| 75 |
+
...
|
| 76 |
+
|
| 77 |
+
# Temperature (°C) — ~51 columns
|
| 78 |
+
"powderBed.temp.current": 97.32, "powderBed.temp.average": 97.11,
|
| 79 |
+
"powderBed.temp.target": 100.0,
|
| 80 |
+
"printBed.temp.current": ..., "printChamber1.temp.current": ...,
|
| 81 |
+
"quadrant1.temp.current": ..., "surfaceAvg.temp.average": ...,
|
| 82 |
+
...
|
| 83 |
+
|
| 84 |
+
# Frames (relative to upstream recorder repo's data/frames/)
|
| 85 |
+
"frame_chamber": "26/1780265532038_chamber.jpg",
|
| 86 |
+
"frame_galvo": "26/1780265532040_galvo.png",
|
| 87 |
+
"frame_thermal": None, # nothing in window
|
| 88 |
+
|
| 89 |
+
# 1 kHz position-stream burst within (tick_ts - 100ms, tick_ts]
|
| 90 |
+
"position_hf_burst": [
|
| 91 |
+
{"ts_offset_ms": -84.2, "x": 0.123, "y": 0.045, "z1": ..., "has_homed": True},
|
| 92 |
+
{"ts_offset_ms": -32.7, "x": 0.131, "y": 0.046, ...},
|
| 93 |
+
],
|
| 94 |
+
}
|
| 95 |
+
```
|
| 96 |
+
|
| 97 |
+
## Important gotchas
|
| 98 |
+
|
| 99 |
+
- **`frame_*` paths are relative to the sibling recorder repo, not this dataset.** `frame_chamber = "26/1780265532038_chamber.jpg"` means `Agentic-Additive-Manufacturing-Process-Optimization/data/frames/26/1780265532038_chamber.jpg`. We don't ship the 81 GB of image bytes here; consumers who need them must clone the recorder repo too. Documented in README.
|
| 100 |
+
- **`positions.position.*` columns are 10 Hz**, not 1 kHz. They come from the snapshot's `position` field. For 1 kHz fidelity during motion, read `position_hf_burst`.
|
| 101 |
+
- **`inova_session_id` is always null** until someone curates `build_to_inova_session.csv` in the recorder repo. The fuzzy `print_profile_id` fallback covers the common case meanwhile.
|
| 102 |
+
- **`build_id` is a Postgres BIGSERIAL**, not a UUID. One Database `PrintSession` may have many `build_id`s (one per recorder restart / attempt). That's why session-id mapping must be hand-authored.
|
| 103 |
+
- **Sensor units are firmware-convention, not labeled in this dataset.** `*.temp.*` are °C, `*.power*` are W, `positions.position.*` are **microns** (firmware native; divide by 1000 for mm). Authoritative annotations live in the upstream `sensors.csv` glossary; when it's filled in, the dataset card will be updated.
|
| 104 |
+
- **Builds without `telemetry/{build_id}.parquet` produce no file here.** `data/ticks/` will have gaps for failed-heating runs (typically 12–38 s with zero recorded telemetry).
|
| 105 |
+
- **The 100 ms window is the recorder's tick interval.** Frame attachment is "the most recent frame within the prior tick interval"; this is a design choice (could be wider or interpolated). If a frame is more than 100 ms stale at tick time, it's null even if it's the closest existing frame. Consider widening the window if frame_kind null rates feel too high.
|
| 106 |
+
|
| 107 |
+
## Current state
|
| 108 |
+
|
| 109 |
+
- `ticks` config: implemented. 10 parquet files (one per build with telemetry), ~24 MB total, ~1.01 M ticks combined. Build 26 (9h54m run): 355,580 ticks, 8.3 MB.
|
| 110 |
+
- 28 of 30 builds have `print_profile_id` resolved; 2 unmatched because their `printProfileName` ("2026_06_09 24mJ/mm Formlabs PA12 GF") isn't in the current 5 Database PrintProfiles snapshot. Adding that profile to Database backfills them automatically on next re-extract.
|
| 111 |
+
- `events` and `plotter_commands` upstream tables are not surfaced (no plans for v2).
|
| 112 |
+
|
| 113 |
+
## Adding a build — recipe
|
| 114 |
+
|
| 115 |
+
1. New build runs in the recorder, produces telemetry / frames / position_hf in Postgres + on disk.
|
| 116 |
+
2. Run `scripts/export.py` in the recorder repo to refresh `data/exports/`.
|
| 117 |
+
3. Run `uv run scripts/ticks/01_extract.py` here — picks up the new `telemetry/{build_id}.parquet` automatically. Or pass specific build IDs as positional args to limit work.
|
| 118 |
+
4. Commit the new `data/ticks/{build_id}.parquet` (LFS).
|
| 119 |
+
|
| 120 |
+
## Regenerate
|
| 121 |
+
|
| 122 |
+
```sh
|
| 123 |
+
uv run scripts/ticks/01_extract.py
|
| 124 |
+
```
|
README.md
CHANGED
|
@@ -1,3 +1,80 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
+
tags:
|
| 4 |
+
- telemetry
|
| 5 |
+
- time-series
|
| 6 |
+
- sls
|
| 7 |
+
- 3d-printing
|
| 8 |
+
- additive-manufacturing
|
| 9 |
+
- inova-mk1
|
| 10 |
+
configs:
|
| 11 |
+
- config_name: ticks
|
| 12 |
+
data_files:
|
| 13 |
+
- split: train
|
| 14 |
+
path: data/ticks/*.parquet
|
| 15 |
+
default: true
|
| 16 |
---
|
| 17 |
+
|
| 18 |
+
# Inova-Mk1-Telemetry
|
| 19 |
+
|
| 20 |
+
Time-aligned printer-state recordings from Inova Mk1 SLS print runs. One row per 10 Hz **tick** of the recorder's `/state/snapshot` poll, with the full sensor state (~64 columns: temperatures, position, power, lights) on every row, the nearest camera frame paths attached when one fell in the prior 100 ms window, and any 1 kHz position-stream samples from that window collected as a nested list.
|
| 21 |
+
|
| 22 |
+
Builds are denormalized into every row, so each parquet file is self-sufficient for ML — no joins needed for build context. A `print_profile_id` references [`ppak10/Inova-Mk1-Database`](https://huggingface.co/datasets/ppak10/Inova-Mk1-Database) when the build's `printProfileName` matches a known `PrintProfile.Name`.
|
| 23 |
+
|
| 24 |
+
```python
|
| 25 |
+
from datasets import load_dataset
|
| 26 |
+
ticks = load_dataset("ppak10/Inova-Mk1-Telemetry", split="train")
|
| 27 |
+
# ticks now has rows like:
|
| 28 |
+
# {build_id, ts, job_name, ..., powderBed.temp.current, laser.power, ...,
|
| 29 |
+
# frame_chamber: "26/...jpg" | None, position_hf_burst: [...]}
|
| 30 |
+
```
|
| 31 |
+
|
| 32 |
+
---
|
| 33 |
+
|
| 34 |
+
## Row shape
|
| 35 |
+
|
| 36 |
+
Each row is one moment in time (a single 10 Hz tick). 80+ columns:
|
| 37 |
+
|
| 38 |
+
| Group | Columns | Notes |
|
| 39 |
+
|---|---|---|
|
| 40 |
+
| **Build context** (denormalized) | `build_id`, `job_name`, `started_at`, `ended_at`, `phase`, `print_profile_id`, `print_profile_name`, `inova_session_id` | Same value on every row in a given parquet file. `inova_session_id` is null until the upstream `build_to_inova_session.csv` is filled in by hand. |
|
| 41 |
+
| **Tick timestamp** | `ts` (`timestamp[us, UTC]`) | The `respondedAt` field on the `/state/snapshot` frame. |
|
| 42 |
+
| **Position (10 Hz)** | `positions.position.{x,y,z1,z2,r}` | Stage position at the tick, **microns** (firmware native; e.g. `z1 = 47272.79` is 47.27 mm). Always present. |
|
| 43 |
+
| **Lights** | `lights.lights.{enabled,count}` | |
|
| 44 |
+
| **Power (W)** | `{laser,fanGalvo,buzzer,laserSafety,io-en,wd-en,wd-in}.power`, `powerman.power.{current,required,max}` | Per-component power draw and the overall manager state. |
|
| 45 |
+
| **Temperature (°C)** | `{powderBed,printBed}.temp.{current,average,target}`, `{powderChamber1..4,printChamber1..4}.temp.{current,average,target}`, `{quadrant1..4,surface,surfaceAvg,surfaceMin,surfaceMax,testTemp1}.temp.{current,average}` | ~51 columns. All firmware temperatures in °C. |
|
| 46 |
+
| **Frame paths** | `frame_chamber`, `frame_galvo`, `frame_thermal` | Nullable. Path is **relative to the upstream recorder repo's `data/frames/`** — this dataset does not ship the 81 GB of image bytes. Null when no frame of that kind was captured in the 100 ms window before the tick. |
|
| 47 |
+
| **Position burst** | `position_hf_burst` | A `list<struct<ts_offset_ms, x, y, z1, z2, r, has_homed>>`. Captures any 1 kHz position-stream events that fell in `(tick_ts - 100 ms, tick_ts]`. Empty list when no motion was happening. |
|
| 48 |
+
|
| 49 |
+
## Files
|
| 50 |
+
|
| 51 |
+
```
|
| 52 |
+
data/ticks/{build_id}.parquet # one file per build that had telemetry
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
10 builds had recorded telemetry; very-short failed-heating builds (~12–38 s, no rows) produce no file. The HF glob `data/ticks/*.parquet` loads everything across builds.
|
| 56 |
+
|
| 57 |
+
## What's lost vs the raw exporter format
|
| 58 |
+
|
| 59 |
+
This dataset is **tick-anchored**, not strict-outer-join. Compared to the upstream flat exports, three things are reduced:
|
| 60 |
+
|
| 61 |
+
- **Position resolution between motion bursts**: the 1 kHz `position_hf` stream is preserved *during* motion (via the per-tick `position_hf_burst` list) but not as standalone rows between ticks. If you need the raw 1 kHz timeline outside the 100 ms windows, fall back to the upstream `position_hf/{build_id}.parquet`.
|
| 62 |
+
- **Sparse-stream events without telemetry**: there is no row for a frame timestamp that doesn't fall near a 10 Hz tick, and no row for sparse `events` (build phase transitions, etc.). Treat this dataset as "what was the state at each tick", not "every recorded event".
|
| 63 |
+
- **`plotter_commands`**: not exposed yet — historical builds predate the recorder feature, and the table is empty.
|
| 64 |
+
|
| 65 |
+
## Joining back to Inova-Mk1-Database
|
| 66 |
+
|
| 67 |
+
Each row carries `print_profile_id` resolved by matching the build's `printProfileName` (from `build_start` event payload) against `PrintProfile.Name` in [`Inova-Mk1-Database/source/PrintProfiles/`](https://huggingface.co/datasets/ppak10/Inova-Mk1-Database). If no match exists, `print_profile_id` is null and `print_profile_name` is preserved as a breadcrumb (typical when a new profile hasn't landed in `Inova-Mk1-Database` yet).
|
| 68 |
+
|
| 69 |
+
A planned authoritative `inova_session_id UUID` join will replace the fuzzy fallback once the upstream `Agentic-Additive-Manufacturing-Process-Optimization/data/exports/build_to_inova_session.csv` has been filled in.
|
| 70 |
+
|
| 71 |
+
## Upstream
|
| 72 |
+
|
| 73 |
+
The raw data lives in the sibling repository [`Agentic-Additive-Manufacturing-Process-Optimization`](https://github.com/ppak10/Agentic-Additive-Manufacturing-Process-Optimization). Its `scripts/export.py` writes flat files under `data/exports/`. This dataset reads from there directly via a sibling-folder relative path — no live database connection required.
|
| 74 |
+
|
| 75 |
+
## Regenerate
|
| 76 |
+
|
| 77 |
+
```sh
|
| 78 |
+
uv run scripts/ticks/01_extract.py # all builds with telemetry
|
| 79 |
+
uv run scripts/ticks/01_extract.py 13 26 # specific build ids
|
| 80 |
+
```
|
data/ticks/1.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5c89eb47b56cdd281b8aad4278d676eb48c45d9d2bb00f6f1af4c45badee1d14
|
| 3 |
+
size 2408141
|
data/ticks/12.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c7bf57cfa86cd5cd75a3434f8b500e9368fc15e0f497f10bdfae02ec4cfb9226
|
| 3 |
+
size 4410552
|
data/ticks/13.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6f49cab6f6acd5a8287bcb555cc4b869f7f1b1e7bec50039226b293dceb6fd5c
|
| 3 |
+
size 377235
|
data/ticks/14.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:eabdcce91ddbf0fefbc75aaee79d7ce15c3069cda3a35e8c922033175c01a384
|
| 3 |
+
size 33288
|
data/ticks/16.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c6796714ed90194c6846054492325dbd3602a87e92b356f21a0ce23d056232b7
|
| 3 |
+
size 34062
|
data/ticks/17.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e9e957034788f2150f2d38dd270c42580614eeb2a92086e0a758a4fff739aecb
|
| 3 |
+
size 32748
|
data/ticks/2.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2ec94cd8dd642f43f0e3eca4a194721393d7229bf904308b502e1c15ceefbc1b
|
| 3 |
+
size 35883
|
data/ticks/25.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fc5d4c35f59fde32d1039cb9d313aaf4ef699c48accf0aaebdbde473723e3f15
|
| 3 |
+
size 34645
|
data/ticks/26.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:40287850b02a93ef479910b971921e005037b9fd2a9670c54b0bed17b1c29e2f
|
| 3 |
+
size 8324930
|
data/ticks/28.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cc7c729b93bad808d56d682ba562d8b8dd10a349c7a046d85d50c57449d5521d
|
| 3 |
+
size 8017822
|
pyproject.toml
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[project]
|
| 2 |
+
name = "inova-mk1-telemetry"
|
| 3 |
+
version = "0.1.0"
|
| 4 |
+
description = "Real-time printer telemetry (temperature, laser, motor, frames, position) from the Inova Mk1 SLS printer, organized per build."
|
| 5 |
+
readme = "README.md"
|
| 6 |
+
requires-python = ">=3.13"
|
| 7 |
+
dependencies = [
|
| 8 |
+
"pyarrow>=15",
|
| 9 |
+
"polars>=1.0",
|
| 10 |
+
]
|
scripts/_lib.py
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Shared paths and the Database FK resolver for the per-entity extract scripts.
|
| 2 |
+
|
| 3 |
+
The raw data lives in a sibling Git repo (the recorder). This dataset has no
|
| 4 |
+
local source files; every extract script reads from `EXPORTS_DIR` and writes
|
| 5 |
+
to `DATA_DIR`.
|
| 6 |
+
"""
|
| 7 |
+
import json
|
| 8 |
+
from pathlib import Path
|
| 9 |
+
|
| 10 |
+
ROOT = Path(__file__).parent.parent
|
| 11 |
+
DATA_DIR = ROOT / "data"
|
| 12 |
+
|
| 13 |
+
# Sibling-repo locations. The Telemetry dataset has no local source/ tree;
|
| 14 |
+
# its raw inputs are the flat exports written by
|
| 15 |
+
# `Agentic-Additive-Manufacturing-Process-Optimization/scripts/export.py`.
|
| 16 |
+
# /mnt/storage2/HuggingFace/Datasets/Inova-Mk1-Telemetry → up three to /mnt/storage2.
|
| 17 |
+
AGENTIC_ROOT = ROOT.parent.parent.parent / "GitHub" / "Agentic-Additive-Manufacturing-Process-Optimization"
|
| 18 |
+
EXPORTS_DIR = AGENTIC_ROOT / "data" / "exports"
|
| 19 |
+
|
| 20 |
+
# Used only by the `builds` extract to resolve print_profile_id.
|
| 21 |
+
DATABASE_ROOT = ROOT.parent / "Inova-Mk1-Database"
|
| 22 |
+
DATABASE_PROFILES_DIR = DATABASE_ROOT / "source" / "PrintProfiles"
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
def iter_jsonl(path: Path):
|
| 26 |
+
"""Stream a JSONL file row-by-row. Skips blank lines."""
|
| 27 |
+
with path.open(encoding="utf-8") as f:
|
| 28 |
+
for line in f:
|
| 29 |
+
line = line.strip()
|
| 30 |
+
if not line:
|
| 31 |
+
continue
|
| 32 |
+
yield json.loads(line)
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
def load_build_to_profile_name() -> dict[int, str]:
|
| 36 |
+
"""Read upstream events.jsonl, return {build_id: printProfileName}.
|
| 37 |
+
|
| 38 |
+
Uses the `build_start` event's `payload.printProfileName` field. Builds
|
| 39 |
+
that never logged a build_start event (the recorder joined mid-run) are
|
| 40 |
+
omitted from the map.
|
| 41 |
+
"""
|
| 42 |
+
events_path = EXPORTS_DIR / "events.jsonl"
|
| 43 |
+
out: dict[int, str] = {}
|
| 44 |
+
for ev in iter_jsonl(events_path):
|
| 45 |
+
if ev.get("kind") != "build_start":
|
| 46 |
+
continue
|
| 47 |
+
name = (ev.get("payload") or {}).get("printProfileName")
|
| 48 |
+
if name:
|
| 49 |
+
out[ev["build_id"]] = name
|
| 50 |
+
return out
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
def load_profile_name_to_id() -> dict[str, str]:
|
| 54 |
+
"""Read Inova-Mk1-Database PrintProfile JSONs, return {Name: Id}.
|
| 55 |
+
|
| 56 |
+
Matches on the in-app `Name` field exactly (slashes preserved); the
|
| 57 |
+
sibling event payload uses the same form (e.g.
|
| 58 |
+
"2026_05_30 20mJ/mm Formlabs PA12 GF").
|
| 59 |
+
"""
|
| 60 |
+
out: dict[str, str] = {}
|
| 61 |
+
for p in DATABASE_PROFILES_DIR.glob("*.json"):
|
| 62 |
+
with p.open() as f:
|
| 63 |
+
blob = json.load(f)
|
| 64 |
+
if "Name" in blob and "Id" in blob:
|
| 65 |
+
out[blob["Name"]] = blob["Id"]
|
| 66 |
+
return out
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
def build_id_to_profile_id() -> dict[int, tuple[str | None, str | None]]:
|
| 70 |
+
"""Compose: {build_id: (print_profile_id, print_profile_name)}.
|
| 71 |
+
|
| 72 |
+
Unresolved profile_id (no Database match) is returned as None alongside
|
| 73 |
+
the still-useful name string.
|
| 74 |
+
"""
|
| 75 |
+
b2name = load_build_to_profile_name()
|
| 76 |
+
n2id = load_profile_name_to_id()
|
| 77 |
+
return {
|
| 78 |
+
bid: (n2id.get(name), name)
|
| 79 |
+
for bid, name in b2name.items()
|
| 80 |
+
}
|
scripts/ticks/01_extract.py
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Build the `ticks` config: one row per 10 Hz telemetry tick per build.
|
| 3 |
+
|
| 4 |
+
Reads upstream flat exports from the sibling recorder repo:
|
| 5 |
+
builds.jsonl, telemetry/{build_id}.parquet, frames.jsonl, position_hf/{build_id}.parquet
|
| 6 |
+
|
| 7 |
+
For each build with telemetry, emits `data/ticks/{build_id}.parquet`:
|
| 8 |
+
- One row per unique telemetry timestamp (the 10 Hz tick from /state/snapshot)
|
| 9 |
+
- Wide-format sensor columns named "{sensor_id}.{kind}" (~64 columns)
|
| 10 |
+
- Denormalized build context (build_id, job_name, ..., print_profile_id)
|
| 11 |
+
- frame_chamber / frame_galvo / frame_thermal: nearest frame path in
|
| 12 |
+
[tick_ts - 100ms, tick_ts], null when no frame fell in that window
|
| 13 |
+
- position_hf_burst: list of {ts_offset_ms, x, y, z1, z2, r, has_homed}
|
| 14 |
+
for all position_hf events in the same 100ms window
|
| 15 |
+
|
| 16 |
+
Usage:
|
| 17 |
+
uv run scripts/ticks/01_extract.py # all builds with telemetry
|
| 18 |
+
uv run scripts/ticks/01_extract.py 13 26 # specific build ids
|
| 19 |
+
"""
|
| 20 |
+
import sys
|
| 21 |
+
from datetime import timedelta
|
| 22 |
+
from pathlib import Path
|
| 23 |
+
|
| 24 |
+
import polars as pl
|
| 25 |
+
|
| 26 |
+
sys.path.insert(0, str(Path(__file__).parent.parent))
|
| 27 |
+
from _lib import EXPORTS_DIR, DATA_DIR, iter_jsonl, build_id_to_profile_id
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
OUTPUT_DIR = DATA_DIR / "ticks"
|
| 31 |
+
WINDOW = timedelta(milliseconds=100) # 10 Hz tick interval
|
| 32 |
+
FRAME_KINDS = ("chamber", "galvo", "thermal")
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
def load_builds_index() -> dict[int, dict]:
|
| 36 |
+
rows = list(iter_jsonl(EXPORTS_DIR / "builds.jsonl"))
|
| 37 |
+
return {r["id"]: r for r in rows}
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
def load_frames_for_build(build_id: int) -> pl.DataFrame:
|
| 41 |
+
"""Read just the frame rows for one build out of the upstream frames.jsonl."""
|
| 42 |
+
rows = [r for r in iter_jsonl(EXPORTS_DIR / "frames.jsonl")
|
| 43 |
+
if r.get("build_id") == build_id]
|
| 44 |
+
if not rows:
|
| 45 |
+
return pl.DataFrame(schema={"ts": pl.Datetime("us", "UTC"),
|
| 46 |
+
"kind": pl.String, "path": pl.String})
|
| 47 |
+
df = pl.DataFrame(rows).select(
|
| 48 |
+
pl.col("ts").str.to_datetime(time_unit="us", time_zone="UTC"),
|
| 49 |
+
pl.col("kind"),
|
| 50 |
+
pl.col("path"),
|
| 51 |
+
)
|
| 52 |
+
return df
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
def pivot_telemetry(tel: pl.DataFrame) -> pl.DataFrame:
|
| 56 |
+
"""Wide-pivot (ts, sensor_id, kind, value) → one row per ts with
|
| 57 |
+
{sensor_id}.{kind} columns. Duplicate samples within a tick collapse via first."""
|
| 58 |
+
tel = tel.with_columns(
|
| 59 |
+
col_name=pl.col("sensor_id") + "." + pl.col("kind")
|
| 60 |
+
)
|
| 61 |
+
return tel.pivot(
|
| 62 |
+
on="col_name", index="ts", values="value", aggregate_function="first"
|
| 63 |
+
).sort("ts")
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
def attach_frames(wide: pl.DataFrame, frames: pl.DataFrame) -> pl.DataFrame:
|
| 67 |
+
"""For each frame kind, attach the nearest path within WINDOW prior to tick_ts."""
|
| 68 |
+
for kind in FRAME_KINDS:
|
| 69 |
+
f = (
|
| 70 |
+
frames.filter(pl.col("kind") == kind)
|
| 71 |
+
.select(pl.col("ts"), pl.col("path").alias(f"frame_{kind}"))
|
| 72 |
+
.sort("ts")
|
| 73 |
+
)
|
| 74 |
+
if f.height == 0:
|
| 75 |
+
wide = wide.with_columns(pl.lit(None, dtype=pl.String).alias(f"frame_{kind}"))
|
| 76 |
+
continue
|
| 77 |
+
wide = wide.sort("ts").join_asof(
|
| 78 |
+
f, on="ts", strategy="backward", tolerance=WINDOW
|
| 79 |
+
)
|
| 80 |
+
return wide
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
def attach_position_hf(wide: pl.DataFrame, build_id: int) -> pl.DataFrame:
|
| 84 |
+
"""Append a `position_hf_burst` column: list of structs of position_hf events
|
| 85 |
+
in (tick_ts - WINDOW, tick_ts]. Empty list when no events in window or no parquet."""
|
| 86 |
+
pos_path = EXPORTS_DIR / "position_hf" / f"{build_id}.parquet"
|
| 87 |
+
burst_dtype = pl.List(
|
| 88 |
+
pl.Struct({
|
| 89 |
+
"ts_offset_ms": pl.Float64,
|
| 90 |
+
"x": pl.Float64, "y": pl.Float64,
|
| 91 |
+
"z1": pl.Float64, "z2": pl.Float64,
|
| 92 |
+
"r": pl.Float64, "has_homed": pl.Boolean,
|
| 93 |
+
})
|
| 94 |
+
)
|
| 95 |
+
if not pos_path.exists():
|
| 96 |
+
return wide.with_columns(pl.lit([], dtype=burst_dtype).alias("position_hf_burst"))
|
| 97 |
+
|
| 98 |
+
pos = pl.read_parquet(pos_path).sort("ts")
|
| 99 |
+
pos_records = pos.to_dicts()
|
| 100 |
+
ticks = wide["ts"].to_list()
|
| 101 |
+
|
| 102 |
+
bursts: list[list[dict]] = []
|
| 103 |
+
pos_lo = 0
|
| 104 |
+
for tick_ts in ticks:
|
| 105 |
+
t_start = tick_ts - WINDOW
|
| 106 |
+
while pos_lo < len(pos_records) and pos_records[pos_lo]["ts"] <= t_start:
|
| 107 |
+
pos_lo += 1
|
| 108 |
+
j = pos_lo
|
| 109 |
+
burst: list[dict] = []
|
| 110 |
+
while j < len(pos_records) and pos_records[j]["ts"] <= tick_ts:
|
| 111 |
+
rec = pos_records[j]
|
| 112 |
+
burst.append({
|
| 113 |
+
"ts_offset_ms": (rec["ts"] - tick_ts).total_seconds() * 1000.0,
|
| 114 |
+
"x": rec.get("x"), "y": rec.get("y"),
|
| 115 |
+
"z1": rec.get("z1"), "z2": rec.get("z2"),
|
| 116 |
+
"r": rec.get("r"), "has_homed": rec.get("has_homed"),
|
| 117 |
+
})
|
| 118 |
+
j += 1
|
| 119 |
+
bursts.append(burst)
|
| 120 |
+
|
| 121 |
+
return wide.with_columns(pl.Series("position_hf_burst", bursts, dtype=burst_dtype))
|
| 122 |
+
|
| 123 |
+
|
| 124 |
+
def denormalize_build(wide: pl.DataFrame, build_row: dict,
|
| 125 |
+
profile_lookup: dict[int, tuple[str | None, str | None]]) -> pl.DataFrame:
|
| 126 |
+
"""Prepend build-context columns to every row. Cheap in parquet thanks to
|
| 127 |
+
dictionary encoding (every row in this file has the same value)."""
|
| 128 |
+
bid = build_row["id"]
|
| 129 |
+
profile_id, profile_name = profile_lookup.get(bid, (None, None))
|
| 130 |
+
return wide.with_columns(
|
| 131 |
+
pl.lit(bid).alias("build_id"),
|
| 132 |
+
pl.lit(build_row.get("job_name")).alias("job_name"),
|
| 133 |
+
pl.lit(build_row.get("started_at")).alias("started_at"),
|
| 134 |
+
pl.lit(build_row.get("ended_at")).alias("ended_at"),
|
| 135 |
+
pl.lit(build_row.get("phase")).alias("phase"),
|
| 136 |
+
pl.lit(profile_id).alias("print_profile_id"),
|
| 137 |
+
pl.lit(profile_name).alias("print_profile_name"),
|
| 138 |
+
pl.lit(None, dtype=pl.String).alias("inova_session_id"),
|
| 139 |
+
)
|
| 140 |
+
|
| 141 |
+
|
| 142 |
+
def process_build(build_id: int, builds_index: dict[int, dict],
|
| 143 |
+
profile_lookup: dict[int, tuple[str | None, str | None]]) -> Path | None:
|
| 144 |
+
tel_path = EXPORTS_DIR / "telemetry" / f"{build_id}.parquet"
|
| 145 |
+
if not tel_path.exists():
|
| 146 |
+
return None
|
| 147 |
+
|
| 148 |
+
tel = pl.read_parquet(tel_path)
|
| 149 |
+
if tel.is_empty():
|
| 150 |
+
return None
|
| 151 |
+
|
| 152 |
+
wide = pivot_telemetry(tel)
|
| 153 |
+
frames = load_frames_for_build(build_id)
|
| 154 |
+
wide = attach_frames(wide, frames)
|
| 155 |
+
wide = attach_position_hf(wide, build_id)
|
| 156 |
+
wide = denormalize_build(wide, builds_index[build_id], profile_lookup)
|
| 157 |
+
|
| 158 |
+
# Put build context + ts first, then sensors, then frames + burst.
|
| 159 |
+
leading = ["build_id", "ts", "job_name", "started_at", "ended_at", "phase",
|
| 160 |
+
"print_profile_id", "print_profile_name", "inova_session_id"]
|
| 161 |
+
frame_cols = [f"frame_{k}" for k in FRAME_KINDS]
|
| 162 |
+
trailing = frame_cols + ["position_hf_burst"]
|
| 163 |
+
middle = [c for c in wide.columns if c not in leading and c not in trailing]
|
| 164 |
+
wide = wide.select(leading + middle + trailing)
|
| 165 |
+
|
| 166 |
+
out_path = OUTPUT_DIR / f"{build_id}.parquet"
|
| 167 |
+
wide.write_parquet(out_path, compression="zstd")
|
| 168 |
+
return out_path
|
| 169 |
+
|
| 170 |
+
|
| 171 |
+
def main():
|
| 172 |
+
OUTPUT_DIR.mkdir(parents=True, exist_ok=True)
|
| 173 |
+
builds_index = load_builds_index()
|
| 174 |
+
profile_lookup = build_id_to_profile_id()
|
| 175 |
+
|
| 176 |
+
args = [int(a) for a in sys.argv[1:]]
|
| 177 |
+
targets = args or sorted(int(p.stem) for p in (EXPORTS_DIR / "telemetry").glob("*.parquet"))
|
| 178 |
+
|
| 179 |
+
for bid in targets:
|
| 180 |
+
if bid not in builds_index:
|
| 181 |
+
print(f"build {bid}: not in builds.jsonl, skipping")
|
| 182 |
+
continue
|
| 183 |
+
out = process_build(bid, builds_index, profile_lookup)
|
| 184 |
+
if out is None:
|
| 185 |
+
print(f"build {bid}: no telemetry parquet, skipping")
|
| 186 |
+
continue
|
| 187 |
+
rows = pl.scan_parquet(out).select(pl.len()).collect().item()
|
| 188 |
+
size = out.stat().st_size
|
| 189 |
+
print(f"build {bid}: wrote {rows:,} ticks → {out.relative_to(Path.cwd())} ({size:,} bytes)")
|
| 190 |
+
|
| 191 |
+
|
| 192 |
+
if __name__ == "__main__":
|
| 193 |
+
main()
|
uv.lock
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version = 1
|
| 2 |
+
revision = 3
|
| 3 |
+
requires-python = ">=3.13"
|
| 4 |
+
|
| 5 |
+
[[package]]
|
| 6 |
+
name = "inova-mk1-telemetry"
|
| 7 |
+
version = "0.1.0"
|
| 8 |
+
source = { virtual = "." }
|
| 9 |
+
dependencies = [
|
| 10 |
+
{ name = "polars" },
|
| 11 |
+
{ name = "pyarrow" },
|
| 12 |
+
]
|
| 13 |
+
|
| 14 |
+
[package.metadata]
|
| 15 |
+
requires-dist = [
|
| 16 |
+
{ name = "polars", specifier = ">=1.0" },
|
| 17 |
+
{ name = "pyarrow", specifier = ">=15" },
|
| 18 |
+
]
|
| 19 |
+
|
| 20 |
+
[[package]]
|
| 21 |
+
name = "polars"
|
| 22 |
+
version = "1.42.0"
|
| 23 |
+
source = { registry = "https://pypi.org/simple" }
|
| 24 |
+
dependencies = [
|
| 25 |
+
{ name = "polars-runtime-32" },
|
| 26 |
+
]
|
| 27 |
+
sdist = { url = "https://files.pythonhosted.org/packages/cb/91/a1d7809a6d399f0aa78d4d3a4f4daf411cb97ccfe7f236c08a01be5fc8a5/polars-1.42.0.tar.gz", hash = "sha256:283ddc923e47857924fbef36580d2e98d984a47c962bae4cbce9c0ebcc98989c", size = 740984, upload-time = "2026-06-24T05:20:13.727Z" }
|
| 28 |
+
wheels = [
|
| 29 |
+
{ url = "https://files.pythonhosted.org/packages/08/4d/094819d251f2248999cb722125fd4e44ee79b753fe535338cbf442fbf45d/polars-1.42.0-py3-none-any.whl", hash = "sha256:ab10cac3f2d28a6e22e22bcac69c0e51fb33cd25aee1f45105782d4fe55a3e6a", size = 836855, upload-time = "2026-06-24T05:18:18.204Z" },
|
| 30 |
+
]
|
| 31 |
+
|
| 32 |
+
[[package]]
|
| 33 |
+
name = "polars-runtime-32"
|
| 34 |
+
version = "1.42.0"
|
| 35 |
+
source = { registry = "https://pypi.org/simple" }
|
| 36 |
+
sdist = { url = "https://files.pythonhosted.org/packages/05/67/20759e9abbc61910cf948f5c28986ab25ef9e8009099b469d64d6a34a478/polars_runtime_32-1.42.0.tar.gz", hash = "sha256:c927e1930881fe0bf9629d12e5d44ebd4ecef2bfa02374dfc79feaa24054394f", size = 3042711, upload-time = "2026-06-24T05:20:15.715Z" }
|
| 37 |
+
wheels = [
|
| 38 |
+
{ url = "https://files.pythonhosted.org/packages/1c/62/8b83fca67d478e4a2b88cbba2fbff4d533052938ff96d598b7915fd9d235/polars_runtime_32-1.42.0-cp310-abi3-macosx_10_12_x86_64.whl", hash = "sha256:d235a5e8349797c16b70ad573fb9ddbd7f162796884bcbd25260908f8408affc", size = 53112358, upload-time = "2026-06-24T05:18:22.275Z" },
|
| 39 |
+
{ url = "https://files.pythonhosted.org/packages/cf/72/06d3d78b7e8e8d3c72ea9eee310950334d50986462b3c1d40f82972495a5/polars_runtime_32-1.42.0-cp310-abi3-macosx_11_0_arm64.whl", hash = "sha256:e7923db3bcb57e0edecde3be28629e0411414a15ef1a4c10c783ac5eadab2e1e", size = 47443757, upload-time = "2026-06-24T05:18:26.326Z" },
|
| 40 |
+
{ url = "https://files.pythonhosted.org/packages/5a/77/20241aaf919a0f63b946fb702bc14447db290ef918e2c2943ed90d50fcc1/polars_runtime_32-1.42.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42e27e2eb5909abcedb4ab4cc04ee67c5ec2b73a5640ebd8739b1b719383fa68", size = 51360855, upload-time = "2026-06-24T05:18:30.709Z" },
|
| 41 |
+
{ url = "https://files.pythonhosted.org/packages/46/5c/ca14606a42628b04d82ac6ae5742ed24048bd43fbf48ae87fc4f4b9e759d/polars_runtime_32-1.42.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1a3c43d4a76360bf912f8772b5ac1c23d5a8efef71408c63bba1bb0b4897a8ea", size = 57299346, upload-time = "2026-06-24T05:18:35.374Z" },
|
| 42 |
+
{ url = "https://files.pythonhosted.org/packages/9c/af/3ad0de43bbb97e91d605d7d76acb30be36269b8a8402890ab4f9892b6e26/polars_runtime_32-1.42.0-cp310-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:542a77b2b969e5157939bfb76cd0f372c4f42db6ccd58636fcefe0011162a418", size = 51512143, upload-time = "2026-06-24T05:18:39.771Z" },
|
| 43 |
+
{ url = "https://files.pythonhosted.org/packages/b2/a5/d1133ba9d005532a6fb94544f5da09e497a8fe42c04e37c3da6faa80bd67/polars_runtime_32-1.42.0-cp310-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:a13949abfce319de7fc4c1abee43bc9d4a4ed4d96bcc1a6037d022e4e9561d9f", size = 55214521, upload-time = "2026-06-24T05:18:43.916Z" },
|
| 44 |
+
{ url = "https://files.pythonhosted.org/packages/bd/54/0b8355ab29669560608b2864a5e54674dd78bbd48c04976607516e081107/polars_runtime_32-1.42.0-cp310-abi3-win_amd64.whl", hash = "sha256:91a07bd852c1d1ea19b3e27c974bc7b1b29ac948fdb2e785da3a6ec0f0683cad", size = 52718509, upload-time = "2026-06-24T05:18:48.202Z" },
|
| 45 |
+
{ url = "https://files.pythonhosted.org/packages/bf/b9/7c46fdbd1dbbaaf77f9512d7665609d7e4c4d8c8849edb9a16c471041075/polars_runtime_32-1.42.0-cp310-abi3-win_arm64.whl", hash = "sha256:b7c5d7721b7bb2563d72785050ac099da1e2000d412f9c72a0cfb7b07779e75d", size = 46728464, upload-time = "2026-06-24T05:18:52.505Z" },
|
| 46 |
+
]
|
| 47 |
+
|
| 48 |
+
[[package]]
|
| 49 |
+
name = "pyarrow"
|
| 50 |
+
version = "24.0.0"
|
| 51 |
+
source = { registry = "https://pypi.org/simple" }
|
| 52 |
+
sdist = { url = "https://files.pythonhosted.org/packages/91/13/13e1069b351bdc3881266e11147ffccf687505dbb0ea74036237f5d454a5/pyarrow-24.0.0.tar.gz", hash = "sha256:85fe721a14dd823aca09127acbb06c3ca723efbd436c004f16bca601b04dcc83", size = 1180261, upload-time = "2026-04-21T10:51:25.837Z" }
|
| 53 |
+
wheels = [
|
| 54 |
+
{ url = "https://files.pythonhosted.org/packages/6f/d3/a1abf004482026ddc17f4503db227787fa3cfe41ec5091ff20e4fea55e57/pyarrow-24.0.0-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:02b001b3ed4723caa44f6cd1af2d5c86aa2cf9971dacc2ffa55b21237713dfba", size = 34976759, upload-time = "2026-04-21T10:48:07.258Z" },
|
| 55 |
+
{ url = "https://files.pythonhosted.org/packages/4f/4a/34f0a36d28a2dd32225301b79daad44e243dc1a2bb77d43b60749be255c4/pyarrow-24.0.0-cp313-cp313-macosx_12_0_x86_64.whl", hash = "sha256:04920d6a71aabd08a0417709efce97d45ea8e6fb733d9ca9ecffb13c67839f68", size = 36658471, upload-time = "2026-04-21T10:48:13.347Z" },
|
| 56 |
+
{ url = "https://files.pythonhosted.org/packages/1f/78/543b94712ae8bb1a6023bcc1acf1a740fbff8286747c289cd9468fced2a5/pyarrow-24.0.0-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:a964266397740257f16f7bb2e4f08a0c81454004beab8ff59dd531b73610e9f2", size = 45675981, upload-time = "2026-04-21T10:48:20.201Z" },
|
| 57 |
+
{ url = "https://files.pythonhosted.org/packages/84/9f/8fb7c222b100d314137fa40ec050de56cd8c6d957d1cfff685ce72f15b17/pyarrow-24.0.0-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:6f066b179d68c413374294bc1735f68475457c933258df594443bb9d88ddc2a0", size = 48859172, upload-time = "2026-04-21T10:48:27.541Z" },
|
| 58 |
+
{ url = "https://files.pythonhosted.org/packages/a7/d3/1ea72538e6c8b3b475ed78d1049a2c518e655761ea50fe1171fc855fcab7/pyarrow-24.0.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:1183baeb14c5f587b1ec52831e665718ce632caab84b7cd6b85fd44f96114495", size = 49385733, upload-time = "2026-04-21T10:48:34.7Z" },
|
| 59 |
+
{ url = "https://files.pythonhosted.org/packages/c3/be/c3d8b06a1ba35f2260f8e1f771abbee7d5e345c0937aab90675706b1690a/pyarrow-24.0.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:806f24b4085453c197a5078218d1ee08783ebbba271badd153d1ae22a3ee804f", size = 51934335, upload-time = "2026-04-21T10:48:42.099Z" },
|
| 60 |
+
{ url = "https://files.pythonhosted.org/packages/9c/62/89e07a1e7329d2cde3e3c6994ba0839a24977a2beda8be6005ea3d860b99/pyarrow-24.0.0-cp313-cp313-win_amd64.whl", hash = "sha256:e4505fc6583f7b05ab854934896bcac8253b04ac1171a77dfb73efef92076d91", size = 27271748, upload-time = "2026-04-21T10:49:42.532Z" },
|
| 61 |
+
{ url = "https://files.pythonhosted.org/packages/17/1a/cff3a59f80b5b1658549d46611b67163f65e0664431c076ad728bf9d5af4/pyarrow-24.0.0-cp313-cp313t-macosx_12_0_arm64.whl", hash = "sha256:1a4e45017efbf115032e4475ee876d525e0e36c742214fbe405332480ecd6275", size = 35238554, upload-time = "2026-04-21T10:48:48.526Z" },
|
| 62 |
+
{ url = "https://files.pythonhosted.org/packages/a8/99/cce0f42a327bfef2c420fb6078a3eb834826e5d6697bf3009fe11d2ad051/pyarrow-24.0.0-cp313-cp313t-macosx_12_0_x86_64.whl", hash = "sha256:7986f1fa71cee060ad00758bcc79d3a93bab8559bf978fab9e53472a2e25a17b", size = 36782301, upload-time = "2026-04-21T10:48:55.181Z" },
|
| 63 |
+
{ url = "https://files.pythonhosted.org/packages/2a/66/8e560d5ff6793ca29aca213c53eec0dd482dd46cb93b2819e5aab52e4252/pyarrow-24.0.0-cp313-cp313t-manylinux_2_28_aarch64.whl", hash = "sha256:d3e0b61e8efb24ed38898e5cdc5fffa9124be480008d401a1f8071500494ae42", size = 45721929, upload-time = "2026-04-21T10:49:03.676Z" },
|
| 64 |
+
{ url = "https://files.pythonhosted.org/packages/27/0c/a26e25505d030716e078d9f16eb74973cbf0b33b672884e9f9da1c83b871/pyarrow-24.0.0-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:55a3bc1e3df3b5567b7d27ef551b2283f0c68a5e86f1cd56abc569da4f31335b", size = 48825365, upload-time = "2026-04-21T10:49:11.714Z" },
|
| 65 |
+
{ url = "https://files.pythonhosted.org/packages/5f/eb/771f9ecb0c65e73fe9dccdd1717901b9594f08c4515d000c7c62df573811/pyarrow-24.0.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:641f795b361874ac9da5294f8f443dfdbee355cf2bd9e3b8d97aaac2306b9b37", size = 49451819, upload-time = "2026-04-21T10:49:21.474Z" },
|
| 66 |
+
{ url = "https://files.pythonhosted.org/packages/48/da/61ae89a88732f5a785646f3ec6125dbb640fa98a540eb2b9889caa561403/pyarrow-24.0.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8adc8e6ce5fccf5dc707046ae4914fd537def529709cc0d285d37a7f9cd442ca", size = 51909252, upload-time = "2026-04-21T10:49:31.164Z" },
|
| 67 |
+
{ url = "https://files.pythonhosted.org/packages/cb/1a/8dd5cafab7b66573fa91c03d06d213356ad4edd71813aa75e08ce2b3a844/pyarrow-24.0.0-cp313-cp313t-win_amd64.whl", hash = "sha256:9b18371ad2f44044b81a8d23bc2d8a9b6a6226dca775e8e16cfee640473d6c5d", size = 27388127, upload-time = "2026-04-21T10:49:37.334Z" },
|
| 68 |
+
{ url = "https://files.pythonhosted.org/packages/ad/80/d022a34ff05d2cbedd8ccf841fc1f532ecfa9eb5ed1711b56d0e0ea71fc9/pyarrow-24.0.0-cp314-cp314-macosx_12_0_arm64.whl", hash = "sha256:1cc9057f0319e26333b357e17f3c2c022f1a83739b48a88b25bfd5fa2dc18838", size = 35007997, upload-time = "2026-04-21T10:49:48.796Z" },
|
| 69 |
+
{ url = "https://files.pythonhosted.org/packages/1a/ff/f01485fda6f4e5d441afb8dd5e7681e4db18826c1e271852f5d3957d6a80/pyarrow-24.0.0-cp314-cp314-macosx_12_0_x86_64.whl", hash = "sha256:e6f1278ee4785b6db21229374a1c9e54ec7c549de5d1efc9630b6207de7e170b", size = 36678720, upload-time = "2026-04-21T10:49:55.858Z" },
|
| 70 |
+
{ url = "https://files.pythonhosted.org/packages/9e/c2/2d2d5fea814237923f71b36495211f20b43a1576f9a4d6da7e751a64ec6f/pyarrow-24.0.0-cp314-cp314-manylinux_2_28_aarch64.whl", hash = "sha256:adbbedc55506cbdabb830890444fb856bfb0060c46c6f8026c6c2f2cf86ae795", size = 45741852, upload-time = "2026-04-21T10:50:04.624Z" },
|
| 71 |
+
{ url = "https://files.pythonhosted.org/packages/8e/3a/28ba9c1c1ebdbb5f1b94dfebb46f207e52e6a554b7fe4132540fde29a3a0/pyarrow-24.0.0-cp314-cp314-manylinux_2_28_x86_64.whl", hash = "sha256:ae8a1145af31d903fa9bb166824d7abe9b4681a000b0159c9fb99c11bc11ad26", size = 48889852, upload-time = "2026-04-21T10:50:12.293Z" },
|
| 72 |
+
{ url = "https://files.pythonhosted.org/packages/df/51/4a389acfd31dca009f8fb82d7f510bb4130f2b3a8e18cf00194d0687d8ac/pyarrow-24.0.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:d7027eba1df3b2069e2e8d80f644fa0918b68c46432af3d088ddd390d063ecde", size = 49445207, upload-time = "2026-04-21T10:50:20.677Z" },
|
| 73 |
+
{ url = "https://files.pythonhosted.org/packages/19/4b/0bab2b23d2ae901b1b9a03c0efd4b2d070256f8ce3fc43f6e58c167b2081/pyarrow-24.0.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:e56a1ffe9bf7b727432b89104cc0849c21582949dd7bdcb34f17b2001a351a76", size = 51954117, upload-time = "2026-04-21T10:50:29.14Z" },
|
| 74 |
+
{ url = "https://files.pythonhosted.org/packages/29/88/f4e9145da0417b3d2c12035a8492b35ff4a3dbc653e614fcfb51d9dedb38/pyarrow-24.0.0-cp314-cp314-win_amd64.whl", hash = "sha256:38be1808cdd068605b787e6ca9119b27eb275a0234e50212c3492331680c3b1e", size = 28001155, upload-time = "2026-04-21T10:51:22.337Z" },
|
| 75 |
+
{ url = "https://files.pythonhosted.org/packages/79/4f/46a49a63f43526da895b1a45bbb51d5baf8e4d77159f8528fc3e5490007f/pyarrow-24.0.0-cp314-cp314t-macosx_12_0_arm64.whl", hash = "sha256:418e48ce50a45a6a6c73c454677203a9c75c966cb1e92ca3370959185f197a05", size = 35250387, upload-time = "2026-04-21T10:50:35.552Z" },
|
| 76 |
+
{ url = "https://files.pythonhosted.org/packages/a0/da/d5e0cd5ef00796922404806d5f00325cdadc3441ce2c13fe7115f2df9a64/pyarrow-24.0.0-cp314-cp314t-macosx_12_0_x86_64.whl", hash = "sha256:2f16197705a230a78270cdd4ea8a1d57e86b2fdcbc34a1f6aebc72e65c986f9a", size = 36797102, upload-time = "2026-04-21T10:50:42.417Z" },
|
| 77 |
+
{ url = "https://files.pythonhosted.org/packages/34/c7/5904145b0a593a05236c882933d439b5720f0a145381179063722fbfc123/pyarrow-24.0.0-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:fb24ac194bfc5e86839d7dcd52092ee31e5fe6733fe11f5e3b06ef0812b20072", size = 45745118, upload-time = "2026-04-21T10:50:49.324Z" },
|
| 78 |
+
{ url = "https://files.pythonhosted.org/packages/13/d3/cca42fe166d1c6e4d5b80e530b7949104d10e17508a90ae202dac205ce2a/pyarrow-24.0.0-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:9700ebd9a51f5895ce75ff4ac4b3c47a7d4b42bc618be8e713e5d56bacf5f931", size = 48844765, upload-time = "2026-04-21T10:50:55.579Z" },
|
| 79 |
+
{ url = "https://files.pythonhosted.org/packages/b0/49/942c3b79878ba928324d1e17c274ed84581db8c0a749b24bcf4cbdf15bd3/pyarrow-24.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:d8ddd2768da81d3ee08cfea9b597f4abb4e8e1dc8ae7e204b608d23a0d3ab699", size = 49471890, upload-time = "2026-04-21T10:51:02.439Z" },
|
| 80 |
+
{ url = "https://files.pythonhosted.org/packages/76/97/ff71431000a75d84135a1ace5ca4ba11726a231a8007bbb320a4c54075d5/pyarrow-24.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:61a3d7eaa97a14768b542f3d284dc6400dd2470d9f080708b13cd46b6ae18136", size = 51932250, upload-time = "2026-04-21T10:51:10.576Z" },
|
| 81 |
+
{ url = "https://files.pythonhosted.org/packages/51/be/6f79d55816d5c22557cf27533543d5d70dfe692adfbee4b99f2760674f38/pyarrow-24.0.0-cp314-cp314t-win_amd64.whl", hash = "sha256:c91d00057f23b8d353039520dc3a6c09d8608164c692e9f59a175a42b2ae0c19", size = 28131282, upload-time = "2026-04-21T10:51:16.815Z" },
|
| 82 |
+
]
|