feat: prezero priority snapshot and internal API
Build artifacts/prezero_priority.json from the anonymized glass fill-level export (11,701 rows, 449 containers, 1,338 location/material series). The contract tier rule yields high 88, medium 248, low 113 with 1,192 overfull readings.
Add /prezero/summary, /prezero/priority, and /prezero/containers/{id} to the internal FastAPI service, with startup validation, filtering/pagination, recent reading history, and 503 isolation when the artifact is missing. Raw CSV stays gitignored; the derived 1.1 MB artifact is the source of truth. This is a priority proof, not a route: the dataset has no coordinates.
This commit is contained in:
1 parent
507f33b7ea
commit
ad63d1caf3
9 files changed
+46198
-4
No files matched your search
@@ -1,12 +1,13 @@
|
||||
UV ?= uv
|
||||
|
||||
.PHONY: help data train small figures test lint check serve docker clean
|
||||
.PHONY: help data train small prezero figures test lint check serve docker clean
|
||||
|
||||
help:
|
||||
@printf '%s\n' \
|
||||
'make data parse/clean the raw CSV, join weather + holidays, export JSON' \
|
||||
'make train fit the 28-day holdout model, export metrics/forecasts/model' \
|
||||
'make small train + print the busy-hour classifier metrics from the raw CSV' \
|
||||
'make prezero build artifacts/prezero_priority.json from the fill-level CSV' \
|
||||
'make figures regenerate docs/figures/*.svg from artifacts/metrics.json' \
|
||||
'make test run pytest' \
|
||||
'make lint run ruff static checks' \
|
||||
@@ -24,6 +25,9 @@ train:
|
||||
small:
|
||||
$(UV) run python scripts/train_small.py
|
||||
|
||||
prezero:
|
||||
$(UV) run python scripts/build_prezero.py
|
||||
|
||||
figures:
|
||||
$(UV) run python scripts/plot_metrics.py
|
||||
|
||||
|
||||
Reference in new issue
Block a user