More patterns · Open reference architecture
ML and GenAI lifecycle on the lakehouse
MLflow tracking, registry and AI Gateway over open tables
Every model run points at the exact table version it was trained on.
In one paragraph
The ML lifecycle on an open lakehouse ties experiments, models and GenAI traces to versioned tables. Features are built by Spark from silver and gold tables in an open format; each MLflow run records parameters, metrics, artifacts and the table snapshot or version it trained on; the MLflow model registry promotes versions; and the MLflow AI Gateway fronts model providers for GenAI applications. Because tables support time travel, any run can be reproduced against the exact data it saw.
More patterns
MLflow tracking, registry and AI Gateway over open tables
Sources
Ingestion
Open lakehouse platform
AI and agents
The agents, the control plane that decides what they may do, and the models behind them.
Engine access
How agents, apps and people reach compute: a client session per identity.
Execution
Spark's execution modes, plus engines that read the same tables.
Data foundation
Open tables in a governed catalog, on storage you own.
Serving
Teams
When to use it
- You need to reproduce a model from months ago.
- You train on lakehouse tables and want lineage from data to model.
- You run GenAI applications and want tracing and evaluation in the same place.
When to pick something else
- Low-latency online feature serving by itself: pair it with the real-time streaming pattern and a key-value store.
Walkthrough
How data moves through it
- 1
Build features
Spark reads gold tables and writes a feature table.
- 2
Record the data version
The training run logs the table's snapshot id or version to MLflow alongside parameters and metrics.
- 3
Register
A good run's model is registered and promoted in the MLflow model registry.
- 4
Serve and trace
Applications call models and providers through the MLflow AI Gateway; traces land back in MLflow for evaluation.
Bill of materials
Components and versions
| Capability | Component | Role in this architecture | Version | License |
|---|---|---|---|---|
| SourcesSource systems | Gold feature tables | Training data | ||
| AI and agentsML lifecycle | MLflow | Tracking, registry, tracing, evaluation and AI Gateway | 3.14.0 in open-lakehouse; 3.1.0 in the course | Apache-2.0 |
| ExecutionBatch and SQL | Apache Sparkor DuckDB, Polars | Feature engineering and batch scoring | Apache-2.0 | |
| Data foundationCatalog and credentials | Unity Catalog OSSor Apache Polaris, Lakekeeper | Tables, and in the course, the catalog the run reads through | Apache-2.0 | |
| Data foundationOpen table format | Apache Icebergor Delta Lake | Snapshot ids give reproducible training sets | Apache-2.0 | |
| OperationsOrchestration | Apache Airflow | Retraining schedules | Apache-2.0 | |
| ServingDashboards and notebooks | Jupyteror marimo | Experiments | BSD-3-Clause |
People and agents
Who works with it
Data engineers
Pipelines that are correct, idempotent and cheap to rerun.
Works with: Batch and SQL, Orchestration, Open table format
ML and AI engineers
Reproducible models, traced and evaluated agents, and a model gateway they control.
Works with: ML lifecycle
Analysts and analytics engineers
One definition of each metric, fast SQL, and dashboards that match.
Works with: Dashboards and notebooks, Batch and SQL
Platform engineers
A platform that is boring to run: deployable from code, observable, with identities for every person, service and agent.
Works with: Catalog and credentials
Governance and security
Policies that hold in every engine and for every agent, lineage for audits, and least privilege by default.
Works with: Catalog and credentials
Run it
Reference code
Runs MLflow 3.14.0 tracking (:5000) and AI Gateway (:5001) next to Spark, Delta and Unity Catalog.
git clone https://github.com/open-lakehouse/open-lakehouse
cd open-lakehouse
cp .env.example .env # fill in POSTGRES_*, S3_* placeholders
./lakehouse setup # validate env, install deps, download ~860MB of JARs
./lakehouse start all # Spark 4.1 master + worker + Connect server + Kafka
./lakehouse start unity-catalog
./lakehouse start mlflow
./lakehouse status --json # confirm healthy (incl. spark.connect_grpc_listening)Chapter 12 trains a model on gold and logs the gold Iceberg snapshot id to MLflow.
Caveats from the reference repos
- MLflow 3.x matches --allowed-hosts exactly; the open-lakehouse stack sets localhost:5000 explicitly.
Industry lenses
Where this architecture shows up
Each card opens the board with that industry's sources. Full industry pages: Banking, Healthcare providers, Energy and utilities, Retail and e-commerce, Telecommunications.
Answers
Frequently asked questions
- How do I make an ML model reproducible on a lakehouse?
- Log the table snapshot id (Iceberg) or version (Delta Lake) used for training to the MLflow run; time travel then lets you read exactly that data again.
- Is MLflow open source?
- Yes. MLflow is Apache-2.0 licensed and hosted by the Linux Foundation.
Related architectures
All architecturesPlatform
The agentic lakehouse
Omnigent and MLflow over sandboxed Spark Connect sessions, on Iceberg and Unity Catalog
Platform
The open lakehouse on a laptop
Spark 4.3, Apache Iceberg, Unity Catalog, Kafka, Airflow, MLflow and an agent, in Docker
Batch
Batch medallion with Spark Declarative Pipelines
Spark 4.3, Apache Iceberg and Unity Catalog with bronze, silver and gold
