feat: ci docs #3

Merged
Noel merged 8 commits from feat/ci-docs into main 2026-11-14 08:31:59 +00:00
4 changed files with 13 additions and 11 deletions
Showing only changes of commit ac0d8984bb - Show all commits

No files matched your search

+3 -2
View File
@@ -6,7 +6,8 @@ forecast: six cheap features, a time-based split, and under a second to fit.
Every number below comes from the baked artifact
`artifacts/small_metrics.json` (version `logit-20261114-052723`, trained
2026-11-14T05:27:23Z) and can be reproduced with `make small`.
2026-11-14T05:27:23Z). `make small` prints the headline metrics and per-sensor
table; `scripts/train_small.py --json` prints the full payload.
## Target
@@ -132,7 +133,7 @@ it is not evidence of a strong signal there.
## Reproduce
```bash
# Full challenge CSV, prints every number above.
# Full challenge CSV, prints the metrics and per-sensor table above.
make small
# Explicit CSV, all rows, save the baked artifact.
+6 -5
View File
@@ -1,16 +1,17 @@
# Training end-to-end evidence
The script starts a real `uvicorn pulsecast.server:app` process with
`CONTROL_TOKEN`, waits for startup, and drives the HTTP API only. It checks the
snapshot, every prediction/scenario path, auth and error paths, one job at a
time, and both training jobs; it exits non-zero on the first failed check.
Unit/contract tests (`make check`) are separate.
Reproduce with:
```bash
uv run python scripts/e2e_train.py --port 18000 --report /tmp/e2e.json
```
The script starts a real `uvicorn pulsecast.server:app` process with
`CONTROL_TOKEN`, waits for startup, and drives the HTTP API only. It exits
non-zero on the first failed check. Unit/contract tests (`make check`) are
separate.
## Run
| Field | Value |
+3 -3
View File
@@ -2,9 +2,9 @@
"""Train and evaluate the small "busy hour" classifier from a CSV.
This is the repeatable artifact behind ``make small`` and the runtime
``model=small`` training job. It prints every number reported in
``docs/small-model.md``; ``--save`` bakes the bundle and metrics into
``artifacts/`` exactly like ``make train`` does.
``model=small`` training job. It prints the headline metrics and per-sensor
table used in ``docs/small-model.md``; ``--save`` bakes the bundle and metrics
into ``artifacts/`` exactly like ``make train`` does.
Examples:
uv run python scripts/train_small.py
+1 -1
View File
@@ -128,7 +128,7 @@ def ensure_weather(
*,
refresh: bool = False,
) -> tuple[pd.DataFrame, pd.DataFrame, dict]:
"""Load cached weather, fetching only when missing, stale, or refresh=True."""
"""Load cached weather, fetching only when the cache is missing or refresh=True."""
cache = config.cache_dir()
cache.mkdir(parents=True, exist_ok=True)
archive_path = cache / ARCHIVE_FILE