The XGBoost MOS "bias correction" sitting on top of Chronos-2 wasn't
earning its keep:
- The monthly retrain (scripts/retrain_mos.py) wrote to models/mos_*.json,
which the live pipeline never loaded — it reads models/price_model.joblib
via ChronosXGBoostForecaster.load(). The retrain has been a silent no-op
since it was written.
- The in-pipeline _train_mos path trained on synthetic data every run
(generate_training_data), against residuals that were structurally OK
but contributed no real accumulated learning. Fresh model per run, 20
samples minimum, no eval gate.
- The retrain script itself had three correctness bugs (cartesian join,
current_price = actual label leak, no promotion gate) — all moot now
since the script is deleted.
Chronos-2 is the honest ML story: a foundation model producing zero-shot
probabilistic forecasts with quantile-native confidence intervals. The
XGBoost standalone model remains as a fallback when Chronos fails to
load or a pair has insuffic…
Phase 1.7: Docker default REGION=kenya + CI region matrix
- Dockerfile: COPY the Kenya data JSONs (markets_kenya.json,
commodities_kenya.json, farmers_kenya.json) and data/ directory
(KAMIS demo snapshot + future cache) alongside the India files.
Set ENV MARKET_INTEL_REGION=kenya as the image default per Phase
11 product decision. Override at deploy time with
-e MARKET_INTEL_REGION=india for the Tamil Nadu config.
- CI backend job now runs as a matrix over [india, kenya] with
MARKET_INTEL_DEMO_MODE=1, executes pytest tests/ under each region.
Frontend job unchanged (region-agnostic).
- weekly-pipeline.yml unchanged: it triggers the HF Space via API
and the Space's own REGION env var determines which region it
ingests. If user wants Kenya on the HF Space, that's an HF secret
change (not a CI change) + an HF Space push — deferred until user
approves.
Does NOT: build Docker locally to verify (~5 min Chronos pre-cache);
user or CI will do that. Does NOT update the weekly-pipeline cron
time (currently 01:00 UTC = 06:30 IST; …
Add monthly MOS retrain from accumulated Neon data
- scripts/retrain_mos.py: pulls prediction-vs-actual pairs from Neon,
builds training features, retrains XGBoost MOS correction models
- POST /api/pipeline/retrain-mos endpoint for triggering from GH Action
- Weekly GH Action retrains on 4th Monday of each month (or manual)
- Model improves over time as more real Agmarknet data accumulates
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Wakes HF Space, triggers pipeline, waits for completion, pauses Space.
Same pattern as Weather AI 2. Requires HF_TOKEN secret.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Full-stack AI pipeline for health commodity forecasting and procurement optimization.
Backend: FastAPI + Claude agents for extraction, healing, reconciliation, demand forecasting, and procurement.
Frontend: React + Vite + Tailwind dashboard with guided tour.
CI: GitHub Actions for backend/frontend validation + weekly pipeline trigger.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>