feat: ci docs #3
No files matched your search
+3
-2
@@ -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
|
Every number below comes from the baked artifact
|
||||||
`artifacts/small_metrics.json` (version `logit-20261114-052723`, trained
|
`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
|
## Target
|
||||||
|
|
||||||
@@ -132,7 +133,7 @@ it is not evidence of a strong signal there.
|
|||||||
## Reproduce
|
## Reproduce
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Full challenge CSV, prints every number above.
|
# Full challenge CSV, prints the metrics and per-sensor table above.
|
||||||
make small
|
make small
|
||||||
|
|
||||||
# Explicit CSV, all rows, save the baked artifact.
|
# Explicit CSV, all rows, save the baked artifact.
|
||||||
|
|||||||
+6
-5
@@ -1,16 +1,17 @@
|
|||||||
# Training end-to-end evidence
|
# 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:
|
Reproduce with:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
uv run python scripts/e2e_train.py --port 18000 --report /tmp/e2e.json
|
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
|
## Run
|
||||||
|
|
||||||
| Field | Value |
|
| Field | Value |
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
"""Train and evaluate the small "busy hour" classifier from a CSV.
|
"""Train and evaluate the small "busy hour" classifier from a CSV.
|
||||||
|
|
||||||
This is the repeatable artifact behind ``make small`` and the runtime
|
This is the repeatable artifact behind ``make small`` and the runtime
|
||||||
``model=small`` training job. It prints every number reported in
|
``model=small`` training job. It prints the headline metrics and per-sensor
|
||||||
``docs/small-model.md``; ``--save`` bakes the bundle and metrics into
|
table used in ``docs/small-model.md``; ``--save`` bakes the bundle and metrics
|
||||||
``artifacts/`` exactly like ``make train`` does.
|
into ``artifacts/`` exactly like ``make train`` does.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
uv run python scripts/train_small.py
|
uv run python scripts/train_small.py
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ def ensure_weather(
|
|||||||
*,
|
*,
|
||||||
refresh: bool = False,
|
refresh: bool = False,
|
||||||
) -> tuple[pd.DataFrame, pd.DataFrame, dict]:
|
) -> 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 = config.cache_dir()
|
||||||
cache.mkdir(parents=True, exist_ok=True)
|
cache.mkdir(parents=True, exist_ok=True)
|
||||||
archive_path = cache / ARCHIVE_FILE
|
archive_path = cache / ARCHIVE_FILE
|
||||||
|
|||||||
Reference in new issue
Block a user