File size: 1,477 Bytes
d7c810d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # TrendeX ML: training code (model v1)
Everything that produced `TrendeX90/expected-greenness@v1` and `TrendeX90/naryn-cube`, in run order:
| Step | Script | What it does |
|---|---|---|
| 0 | `scripts/setup_box.sh`, `scripts/00_smoke.py` | environment; prove each NASA source opens |
| 1 | `scripts/05_aoi.py` | Naryn oblast = 5 ADM2 districts + 20 km buffer, known-place boxes |
| 2 | `scripts/10_download.py` | MODIS / NASADEM from LP DAAC, IMERG / GLDAS from GES DISC (earthaccess) |
| 3 | `scripts/20_build_cube.py`, `scripts/25_qa_cube.py` | 1 km MODIS-grid cube + QA report |
| 4 | `configs/model_v1.yaml` | protocol, committed in git before the first fit |
| 5 | `scripts/30_train.py` | tuning, temporal + spatial tests, baselines, pre-registered gate, out-of-fold predictions |
| 6 | `scripts/40_products.py` | residual trends (shared `src/trendex_ml/stats/trend.py`), placebo, season vs weather, Aqua-Terra |
| 7 | `scripts/45_package.py`, `scripts/50_push_hf.py` | model repo with golden test; push to HF |
| 8 | `scripts/55_scenarios.py`, `scripts/60_verify_hf.py` | precomputed what-if grid for the static site; verify HF from a clean machine |
Run on one GPU box (RTX 4070, 40 cores) in about 3 hours including downloads; training itself took ~7 minutes.
`requirements.lock` is the exact environment. Credentials (Earthdata, HF) are read from `~/.netrc` and the HF token cache; none are in this code.
AI use: implementation was assisted by Claude (Anthropic).
|