Add Dagster orchestration and reduce active brands in backend
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user