feat(ml): enregistrer le modèle dans le MLflow Model Registry

This commit is contained in:
Valentin
2026-09-21 12:04:49 +02:00
parent 9a72bb3a8f
commit 268496a8c4
2 changed files with 21 additions and 1 deletions
+5 -1
View File
@@ -181,7 +181,11 @@ def _log_to_mlflow(
)
mlflow.log_metrics({f"model_{cle}": valeur for cle, valeur in model_metrics.items()})
mlflow.log_metrics({f"baseline_{cle}": valeur for cle, valeur in baseline_metrics.items()})
mlflow.lightgbm.log_model(booster, name="model")
mlflow.lightgbm.log_model(
booster,
name="model",
registered_model_name="consumption-forecast-lightgbm",
)
mlflow.log_artifact(str(model_output))