Ejemplo: Retail Demand Forecast
Predicción de demanda semanal con LSTM para un retailer de e-commerce.
godml.yml
name: retail-demand-forecast
version: 1.0.0
provider: mlflow
dataset:
uri: ./data/weekly_sales.csv
target: units_sold
dataprep:
steps:
- op: drop_columns
params:
columns: [store_id, sku_description]
- op: fill_missing
params:
strategy: median
columns: [price, discount_pct, stock_level]
- op: scale
params:
columns: [price, discount_pct, stock_level, promo_spend]
method: minmax
governance:
owner: equipo-supply-chain
tags:
- domain: retail
- task: demand-forecast
model:
type: lstm
hyperparameters:
eta: 0.001
n_estimators: 100 # epochs
random_state: 42
metrics:
- name: auc
threshold: 0.70
deploy:
batch_output: ./output/demand_forecast.csv
model_output: ./output/lstm_model.pkl
Instalar y ejecutar
pip install godml[deep] # incluye TensorFlow + Keras
godml run -f godml.yml
Alternativa tabular (sin GPU)
model:
type: random_forest
hyperparameters:
n_estimators: 200
max_depth: 10
pip install godml
godml run -f godml.yml
Stack: XGBoost + MLflow + despliegue FastAPI en contenedor.
Incluye entrenamiento, evaluación (MSE) y servicio realtime.