MLflow for tracked, reproducible models
Experiment tracking, a model registry and evaluation, set up so every model in production is reproducible.

How we use MLflow
MLflow records the parameters, metrics, code and artifacts behind every model, manages which version is in production, and packages models for serving. Newer releases add tracing and evaluation for LLM applications. We set it up as the backbone of your ML lifecycle.
What we build with it
- Central tracking server and model registry for your team
- Promotion workflow from candidate to production
- Packaged models served as APIs or batch jobs
- Tracing and evaluation for GenAI features
MLflow, running on our machines
Real screenshots and the exact code behind them, from a run on our own machines.


"""Demand-forecasting experiment tracked in MLflow (synthetic daily sales data), used for the vithupro.in MLflow page.
Logs params, metrics and the model for several runs, then registers the best one with the 'champion' alias."""
import numpy as np
import pandas as pd
import mlflow
from mlflow import MlflowClient
from sklearn.ensemble import GradientBoostingRegressor, RandomForestRegressor
from sklearn.metrics import mean_absolute_error, mean_absolute_percentage_error
rng = np.random.default_rng(7)
days = pd.date_range("2024-01-01", periods=730, freq="D")
t = np.arange(len(days))
sales = 200 + 0.15 * t + 40 * np.sin(2 * np.pi * t / 7) + 60 * np.sin(2 * np.pi * t / 365) + rng.normal(0, 18, len(t))
df = pd.DataFrame({"ds": days, "y": sales})
for lag in (1, 7, 14, 28):
df[f"lag_{lag}"] = df["y"].shift(lag)
df["dow"], df["month"] = df["ds"].dt.dayofweek, df["ds"].dt.month
df = df.dropna()
features = [c for c in df.columns if c not in ("ds", "y")]
train, test = df.iloc[:-90], df.iloc[-90:]
mlflow.set_tracking_uri("sqlite:///runs/mlflow.db")
mlflow.set_experiment("demand-forecast")
candidates = [
("rf-200-d8", RandomForestRegressor, {"n_estimators": 200, "max_depth": 8}),
("rf-400-d12", RandomForestRegressor, {"n_estimators": 400, "max_depth": 12}),
("gbr-300-lr0.05", GradientBoostingRegressor, {"n_estimators": 300, "learning_rate": 0.05, "max_depth": 3}),
("gbr-600-lr0.03", GradientBoostingRegressor, {"n_estimators": 600, "learning_rate": 0.03, "max_depth": 4}),
]
best = None
for name, Model, params in candidates:
with mlflow.start_run(run_name=name) as run:
model = Model(random_state=7, **params).fit(train[features], train["y"])
pred = model.predict(test[features])
mae, mape = mean_absolute_error(test["y"], pred), mean_absolute_percentage_error(test["y"], pred)
mlflow.log_params({"model": Model.__name__, **params, "horizon_days": 90, "features": len(features)})
mlflow.log_metrics({"mae": mae, "mape": mape})
mlflow.set_tags({"team": "vithupro", "dataset": "synthetic-daily-sales-v1"})
mlflow.sklearn.log_model(model, name="model", input_example=test[features].head(3), skops_trusted_types=["sklearn.tree._tree.Tree"])
print(f"{name:16s} MAE={mae:6.2f} MAPE={mape:.3%}")
if best is None or mae < best[1]:
best = (run.info.run_id, mae, name)
mv = mlflow.register_model(f"runs:/{best[0]}/model", "demand-forecaster")
MlflowClient().set_registered_model_alias("demand-forecaster", "champion", mv.version)
print("champion:", best[2], "version", mv.version)rf-200-d8 MAE= 19.79 MAPE=7.315% rf-400-d12 MAE= 20.00 MAPE=7.391% gbr-300-lr0.05 MAE= 17.56 MAPE=6.539% gbr-600-lr0.03 MAE= 18.59 MAPE=6.874% champion: gbr-300-lr0.05 version 1
Patterns we rely on
Tracking everything
Parameters, metrics, datasets and artifacts logged for each run, so results can be compared and reproduced.
Registry with aliases
Versions promoted by alias (for example champion and challenger) with review before production.
Standard packaging
Models saved in MLflow format with their environment, so serving does not depend on a notebook.
GenAI tracing and evaluation
Traces of LLM calls and evaluation runs alongside classic model metrics.
Our production checklist
What we put in place before a MLflow system goes live.
- Tracking server with a database backend and object storage
- Authentication and access control
- Naming and tagging conventions
- Automated promotion checks
- Retraining pipeline that logs to MLflow
- Monitoring linked to model versions
Questions
Managed or self-hosted MLflow?
Both work. We self-host on your cloud, or use a managed MLflow service when you already have one.
Can MLflow track LLM experiments?
Yes. We use it to track prompt and model variants with evaluation scores, alongside traditional models.
Often used together with:
Need MLflow engineers?
Tell us what it needs to do. We reply within one business day with questions, a rough plan and the next step.
- Free 30-minute architecture call
- NDA before you share details
- You own all code and IP
- Reply within one business day