MLflow Starter Kit
MLflow experiment tracking setup, model registry patterns, and deployment configs for going from notebooks to production.
📄 Product Preview
Try the interactive reader and demo tools below, or get the full product with all content unlocked.
📖 Interactive Reader (Free Preview) ⚙ Try Demo Tools 📦 Download Free Sample📁 File Structure 18 files
📖 Documentation Preview README excerpt
MLflow Starter Kit
A typed, production-minded layer over [MLflow](https://mlflow.org) that takes you
from ad-hoc notebook experiments to a structured, reproducible MLOps workflow:
experiment tracking, a model registry promotion lifecycle, autologging
for scikit-learn / XGBoost, deployment config generation for batch and
real-time serving, and a one-command Docker stack (MLflow + Postgres + MinIO).
The Python package (mlflow_starter) is a thin, well-documented wrapper -- you
can always drop down to the raw mlflow.* API. Everything ships with docstrings,
type hints, runnable examples, and a real pytest suite.
Features
- Typed configuration (
MLflowConfig) -- load from env vars, a mapping, or a
JSON/YAML file; validate it; export it to the environment in one call.
- Experiment tracking helpers -- one
experiment_runcontext manager that
sets the server, experiment, and default tags; helpers that flatten nested
hyper-parameters, log metric series (training curves), JSON config blobs, and
text artifacts without temp-file juggling.
- Model registry facade (
ModelRegistry) --register_from_run, stage
transitions (Staging / Production / Archived) with automatic archiving,
load-by-stage, latest-version lookups, and MLflow 2.9+ aliases.
- Autologging wrappers -- project-sane
AutologOptionsdefaults plus
per-framework wrappers for scikit-learn and XGBoost, and an autolog_run
context manager.
- Deployment generators -- build
mlflow models serve/build-docker
commands, Docker Compose services, a Kubernetes CronJob, and a complete
standalone batch-scoring script -- all as plain text/dicts you can commit.
- Self-hosted stack --
docker/docker-compose.ymlruns a real MLflow server
backed by PostgreSQL (metadata) and MinIO (S3-compatible artifacts).
Requirements
- Python 3.9+ (the package itself uses only the standard library)
- For running models:
pip install mlflow(2.x); examples also use
scikit-learn
- Docker + Docker Compose (optional, for the bundled tracking stack)
Quick Start
1. Start a tracking server (optional but recommended)
docker compose -f docker/docker-compose.yml up -d
# MLflow UI -> http://localhost:5000
# MinIO console-> http://localhost:9001 (minioadmin / minioadmin)
No server? The examples automatically fall back to a local ./mlruns file store.
2. Point your code at it and log a run
from mlflow_starter import MLflowConfig, configure, experiment_run, log_params, log_metrics
configure(MLflowConfig.from_env()) # reads MLFLOW_TRACKING_URI, tags, ...
with experiment_run("baseline", tags={"owner": "ml-team"}) as run:
log_params({"model": {"max_depth": 6, "n_estimators": 300}}) # auto-flattened
*... continues with setup instructions, usage examples, and more.*