Commit Graph
8 Commits
Author SHA1 Message Date
Noel Sabia 2b9617fd71 ci: add ruff static gate to make check and Gitea workflow
ci / check (push) Failing after 40s
ci / check (pull_request) Failing after 6s
Adds ruff as a dev dependency with an explicit py312 E/F rule set, so the
gate stays stable across ruff releases. make check now runs uv sync --frozen,
ruff, compileall, and pytest; make lint runs ruff alone.

The Gitea job splits the same checks into named steps for readable failures
and has a 10-minute timeout. No secrets, image push, or cluster access.
2026-11-14 06:04:15 +01:00
Noel Sabia 8656d9bc8a feat: add /bootstrap snapshot, numeric UID 10001, CI gate
GET /bootstrap returns the 8 sensors, hourly series for all of them,
context, meta, and versions in the CONTRACT.md shape. Snapshot artifacts
are projected to contract fields once at boot; incomplete artifacts return
503. Adds tests for shape, sensor count, hourly alignment, and versions.

Dockerfile now creates UID/GID 10001, uses COPY --chown=10001:10001, and
runs as USER 10001:10001. Adds make check and a minimal Gitea Actions
workflow that runs the same local gate: uv sync --frozen, compileall, pytest.
2026-11-14 06:00:14 +01:00
Noel Sabia 7ec4fc8bb3 merge: ML pipeline, FastAPI, small model, artifacts 2026-11-14 05:52:02 +01:00
Noel Sabia dc83825de0 fix: use exact 168-row lag for the seasonal-naive baseline
The baseline now reproduces mission/data.md exactly: MAE 5.40, WAPE 44.7%,
R2 0.462. The model's lag_week remains the previous observed same weekday/hour,
which handles sensor gaps and is documented in the model card.
2026-11-14 05:04:41 +01:00
Noel Sabia 939a8db482 feat: complete ML pipeline, FastAPI service, small model, tests, image
- finish the global HistGB bundle, scenario forecasts and 28-day ablation
- export sensors/series/forecasts/metrics/context plus baked weather frames
- add FastAPI health/meta/predict/simulate and background /train jobs
- add the p75 busy classifier, retraining from CSV, and hot-swap persistence
- add pytest coverage, multi-stage non-root Dockerfile, README and model card

Holdout: weather 7d MAE 3.32 / WAPE 27.5% / R2 0.777 vs seasonal naive
MAE 4.23 / WAPE 35.0% / R2 0.656 (5,350 eval rows).
2026-11-14 05:01:16 +01:00
Noel Sabia 68402803b2 feat: add pipeline and training entrypoints 2026-11-14 04:24:15 +01:00
Noel Sabia 8a81af771e chore: sync ML environment 2026-11-14 04:23:43 +01:00
Noel Sabia 2eeb1f937a chore: bootstrap ML-py scaffold 2026-11-14 04:16:22 +01:00