Add Dagster orchestration and reduce active brands in backend

This commit is contained in:
sriram
2026-08-20 16:39:54 +05:30
parent fbb1356e47
commit 7bf8dc6922
66 changed files with 2664 additions and 21 deletions

View File

@@ -0,0 +1,24 @@
# Archived model artifacts
These three models still have **all of their training code, CLI flags and API
options intact**. Only the pre-trained `.joblib` bundles were moved out of the
loaded directory, because nothing in the application ever reads them back.
| Artifact | Why archived |
|---|---|
| `demand_forecast_model.joblib` | `train_forecast` fits it and writes the `demand_forecast` table, but `store_db.get_latest_demand_forecast()` has **zero callers** - no endpoint, service or MCP tool consumes the forecast. |
| `store_performance_model.joblib` | Referenced only from `ml_training_service.train_store_performance`. No inference consumer. |
| `purchase_propensity_model.joblib` | Referenced only from `ml_training_service.train_purchase_propensity`. No inference consumer. |
They are excluded from `train_all()`'s **default** set
(`ml_training_service.PRODUCTION_MODELS`), not from the codebase. To rebuild one:
```
python scripts/train_ml_models.py --models store_performance
```
or `POST /api/admin/store-intelligence/train {"models": ["store_performance"]}`.
Training writes to `MODEL_ARTIFACTS_DIR` (the parent directory), so a retrain
promotes the model back to production automatically - wire up an endpoint that
reads it first, or it will simply sit there unread again.