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

@@ -8,11 +8,16 @@ Run from `backend/` AFTER scripts/seed_store_intelligence.py:
python scripts/train_ml_models.py
python scripts/train_ml_models.py --models discount trending # train a subset
Models trained: discount, trending, popularity, forecast (demand +
inventory), store_performance, purchase_propensity. Every trained
model is saved to app/intelligence/artifacts/*.joblib and loaded lazily
by the API on first use - restart the API process after retraining to
pick up new artifacts (see docs/CHANGES.md, "Retraining").
By default this trains the models the API actually serves: discount,
trending, popularity. The other three - forecast (demand + inventory),
store_performance, purchase_propensity - train correctly but have no
inference consumer, so they are opt-in by name:
python scripts/train_ml_models.py --models store_performance
Every trained model is saved to app/intelligence/artifacts/*.joblib and
loaded lazily by the API on first use - restart the API process after
retraining to pick up new artifacts (see docs/CHANGES.md, "Retraining").
"""
from __future__ import annotations
@@ -32,7 +37,7 @@ def main() -> None:
parser.add_argument(
"--models", nargs="+", default=None,
choices=["discount", "trending", "popularity", "forecast", "store_performance", "purchase_propensity"],
help="Subset of models to train (default: all)",
help="Subset of models to train (default: the served models - discount, trending, popularity)",
)
args = parser.parse_args()