@trillboards/edge-sdk 0.2.104 → 0.2.107
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deploy/detector/README.md +33 -0
- package/deploy/detector/bench/litert-twin-parity.json +27 -1
- package/deploy/detector/bench/venue_adjudication.py +790 -0
- package/deploy/detector/bench/verify_litert_twin_parity.py +34 -10
- package/deploy/detector/ram-budget.js +225 -0
- package/deploy/detector/ram-budget.json +76 -0
- package/deploy/detector/tests/test_ram_budget.py +124 -0
- package/deploy/detector/trillboards_detector/labels.py +23 -1
- package/deploy/macos/com.trillboards.detector.plist +14 -3
- package/deploy/macos/scripts/setup-detector.sh +34 -0
- package/deploy/systemd/install.sh +14 -1
- package/deploy/systemd/setup-detector.sh +71 -0
- package/deploy/windows/install-update.ps1 +60 -0
- package/deploy/windows/register-detector-task.ps1 +45 -1
- package/deploy/windows/setup-detector.ps1 +53 -1
- package/dist/EdgeAgent.js +1 -1
- package/dist/diagnose.d.ts +1 -1
- package/dist/diagnose.js +1 -1
- package/package.json +1 -1
|
@@ -133,6 +133,39 @@ states the box is in. The service does not exit when nothing was injected: all
|
|
|
133
133
|
three supervisors restart on a non-zero exit, and this file's own rule for a
|
|
134
134
|
required input that has not arrived is *start, and report the reason*.
|
|
135
135
|
|
|
136
|
+
#### Who actually supplies it — added 2026-08-26, because until then NOBODY did
|
|
137
|
+
|
|
138
|
+
This section described a parameter that existed on both spellings and was passed
|
|
139
|
+
on neither. `TRILLBOARDS_DETECTOR_RAM_BUDGET_MB` appeared in this file, in
|
|
140
|
+
`cli.py`, in `modelpath.py` and in the tests, and in **zero** of the six
|
|
141
|
+
supervisor definitions — so on every fielded box the "not injected" row of the
|
|
142
|
+
table above was not one of two states, it was the only one, and every delivered
|
|
143
|
+
specialist was permanently `idle`.
|
|
144
|
+
|
|
145
|
+
`ram-budget.js`, in this directory, is the supplier. It is run by the three
|
|
146
|
+
installers, not by this service — the ceiling must stay something this process is
|
|
147
|
+
TOLD — and it derives the number from the box rather than picking one, because
|
|
148
|
+
`docs/runbooks/sensing-model-library.md` §2 is arithmetic about a SET on a
|
|
149
|
+
specific machine and the two measured field boxes are 9.8 GB and 31.4 GB. It
|
|
150
|
+
subtracts the on-device VLM's measured working set, the connector process and the
|
|
151
|
+
capture lane from physical memory, floors the result at the pinned model's own
|
|
152
|
+
footprint (below that `ModelRegistry.__init__` raises and the supervisor
|
|
153
|
+
crash-loops, which is strictly worse than being constrained), and prints the whole
|
|
154
|
+
subtraction with `--explain` so an installer log says why.
|
|
155
|
+
|
|
156
|
+
Three transports, one number, because the three supervisors differ in what they
|
|
157
|
+
can carry:
|
|
158
|
+
|
|
159
|
+
| platform | how | why not the other one |
|
|
160
|
+
| --- | --- | --- |
|
|
161
|
+
| Linux | `TRILLBOARDS_DETECTOR_RAM_BUDGET_MB` in `/etc/trillboards/env` | the unit is a static file `install.sh` copies verbatim; there is nothing to template, and both units already declare `EnvironmentFile=-` |
|
|
162
|
+
| macOS | `--ram-budget-mb` in the plist's `ProgramArguments` | the plist IS generated by `setup-detector.sh`, from a template |
|
|
163
|
+
| Windows | `--ram-budget-mb` in the Scheduled Task's argument string | a Scheduled Task action has no environment block, and a User-scope variable would be global machine state |
|
|
164
|
+
|
|
165
|
+
On every platform, **failing to derive injects nothing** rather than a fallback —
|
|
166
|
+
the "not injected" row stays reachable, and it is the honest thing to report about
|
|
167
|
+
a box we could not measure.
|
|
168
|
+
|
|
136
169
|
**Eviction is a last-resort safety valve, not the allocator.** It logs a WARNING
|
|
137
170
|
naming the box as oversubscribed against what it was allocated, and `/health`
|
|
138
171
|
carries a top-level `evictions` count — because a service quietly thrashing
|
|
@@ -20,7 +20,18 @@
|
|
|
20
20
|
"its scores agree to 7.2e-08, but row-wise the two disagree and lexsorting by box does",
|
|
21
21
|
"not collapse it. The model returns ZERO detections above 0.25 on 40 real production",
|
|
22
22
|
"frames, so there is no above-threshold sample to compare and row-level parity is",
|
|
23
|
-
"UNVERIFIED. It is not published. Settle it on a corpus the model actually fires on."
|
|
23
|
+
"UNVERIFIED. It is not published. Settle it on a corpus the model actually fires on.",
|
|
24
|
+
"",
|
|
25
|
+
"2026-08-26: the 22nd twin, gh_fall_tonlong_v2, is the first whose LiteRT input is",
|
|
26
|
+
"NHWC [1,640,640,3]. The line above saying an ultralytics detect export is NOT NHWC",
|
|
27
|
+
"described the TOOLCHAIN the first 21 were exported with, not LiteRT: onnx2tf",
|
|
28
|
+
"transposes to channels-last by design and ultralytics 8.3.145 leaves it that way.",
|
|
29
|
+
"verify_litert_twin_parity.py used to ASSERT NCHW and refused a correct twin; it now",
|
|
30
|
+
"reads the input layout off the graph -- the same rule it already applied to outputs",
|
|
31
|
+
"-- and feeds each runtime the SAME IMAGE in the layout that runtime declares. The",
|
|
32
|
+
"warning that motivated the assertion still stands: transposing because 'LiteRT is",
|
|
33
|
+
"channels-last' feeds a rotated image to a model that wanted NCHW, and every residual",
|
|
34
|
+
"then reads as export noise."
|
|
24
35
|
],
|
|
25
36
|
"measured_at": "2026-08-25",
|
|
26
37
|
"tolerances": {
|
|
@@ -308,6 +319,21 @@
|
|
|
308
319
|
"reason": "ok",
|
|
309
320
|
"onnx": "weapon_gunknife_11n.onnx",
|
|
310
321
|
"litert": "weapon_gunknife_11n.tflite"
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"layout": "anchor_4_plus_nc",
|
|
325
|
+
"imgsz": 640,
|
|
326
|
+
"box_scale_applied": 640.0,
|
|
327
|
+
"box_residual_px": 0.0007171630859375,
|
|
328
|
+
"box_residual_unscaled": 646.9068156480789,
|
|
329
|
+
"cls_residual": 1.3665612286217765e-07,
|
|
330
|
+
"pass": true,
|
|
331
|
+
"reason": "ok",
|
|
332
|
+
"onnx": "gh_fall_tonlong_v2.onnx",
|
|
333
|
+
"litert": "gh_fall_tonlong_v2.tflite",
|
|
334
|
+
"litert_input_layout": "nhwc",
|
|
335
|
+
"measured_at": "2026-08-26",
|
|
336
|
+
"note": "The 22nd twin, added 2026-08-26, and the FIRST whose LiteRT input is NHWC. gh_fall_tonlong had no parity measurement at all until now: upstream ships `Violence` at slot 0 and `violence` at slot 6, normalize_class_name folds them to one name and ModelVocabulary refuses at construction, so neither format could be probed. Both were re-exported from ok.pt (sha256 1e12d89198e28d7c650ba86886c511fecd9f70b9d7f8bf985e76704690e58dd9) with the slots disambiguated by INDEX -- violence_slot0 / violence_slot6 -- which preserves upstream truth and asserts no semantics we have not measured."
|
|
311
337
|
}
|
|
312
338
|
]
|
|
313
339
|
}
|