What you will be able to do
- Explain why dev, staging and production are separate environments and map each one to its own Unity Catalog catalog
- Match code, data, experiments and models to the Databricks tool that manages each: Git, Delta tables, MLflow, Models in Unity Catalog
- Name deploy code as Databricks' default promotion strategy and describe what it means for where the production model is trained
- Place each step of the automated train, validate, deploy chain in order, including which step assigns Challenger and which reassigns Champion
- Describe what MLOps Stacks scaffolds and how a pull request moves through staging to production
Key concept
Environment-isolated, code-promoted MLOps — A Databricks MLOps strategy keeps development, staging and production as separate environments, each backed by its own Unity Catalog catalog. Reviewed code moves between them, and an automated pipeline in each environment rebuilds, validates and deploys the model.
1.What an MLOps strategy has to manage
MLOps is the set of processes and automated steps that manage an ML system's code, data and models so the system stays fast, stable and cheap to run over time. It combines three older practices. DevOps covers code, DataOps covers data pipelines, and ModelOps covers the model lifecycle. An ML system needs all three, because a model can go wrong when its code changes, when its input data changes, or when someone replaces it with a new version.
The strategy rests on a gradient of control. Assets start in development, where access is loose and testing is light. They pass through an intermediate testing stage and end in production, which is tightly controlled. On Databricks all of these assets sit on one platform with unified access control. That removes a whole class of risk: data does not have to be copied between systems before a model can be trained or served.
CI/CD (continuous integration and continuous delivery) is how the movement between stages gets automated. When building, testing and deploying are automated, teams release more often and more reliably than they can by hand. In ML the automated workflow has to track more than code. It also tracks:
- training data, including its quality, schema changes and distribution changes
- the input data pipelines that feed the model
- the code that trains, validates and serves the model
- the model's predictions and performance once it is live
Checkpoint 1 of 9· Check yourself
A team's CI/CD pipeline for an ML project tests only the training and serving code, as a classic DevOps pipeline would. A month after release, the model's accuracy drops even though nobody changed the code or replaced the model. According to Databricks, what is missing from their automated workflow?
A model can go wrong when its input data changes, not only when its code changes. That is why CI/CD for ML also tracks training data, the input data pipelines, and the model's predictions and performance once it is live.
“Training data, including data quality, schema changes, and distribution changes.”Source: docs.databricks.com
2.Separate dev, staging and prod environments, one catalog each
An execution environment is where code creates or consumes models and data. It is more than a workspace label: each environment has its own compute instances, runtimes and libraries, and automated jobs. Databricks recommends three of them (development, staging and production) with clearly defined transitions between them. Organisations can choose other configurations, but these three are the reference design.
Unity Catalog is Databricks' central governance layer for data and AI assets, models included. Objects in it are named in three levels, catalog.schema.object, and privileges attach at each level: USE CATALOG on a catalog, USE SCHEMA and CREATE MODEL on a schema, EXECUTE on a model. That nesting is why a catalog works as the boundary of an environment.
In Unity Catalog, each environment usually corresponds to its own catalog, and often to its own workspace as well. The catalog is what separates access and data by environment. Data scientists have read-write access to the dev catalog, where they create temporary data and feature tables while they experiment. The prod catalog is where the governed production assets live.
Data scientists should not be cut off from production. Ideally they have read-only access to the prod catalog, including production data, inference tables and metric tables, so they can analyse how the live model is behaving. They should also be able to load production models to compare against. If read-only access cannot be granted, the fallback is to write a snapshot of production data into the dev catalog. Read-write access to prod from development is never the answer.
Models follow the same mapping as data. Pipeline code should register each model to the catalog of the environment the pipeline ran in. A training run in the development workspace registers to dev, and the same pipeline running in production registers to prod. The first part of the three-level name <catalog>.<schema>.<model> therefore records the environment. Governance rules attach at that level, for example a rule that only admins may delete from prod.
mlflow.register_model(
"runs:/<run_id>/model", "prod.ml_team.iris_model"
)Checkpoint 2 of 9· Check yourself
Security policy blocks the development workspace from reading the prod catalog at all. Data scientists still need to build and evaluate project code against realistic production data. What does Databricks recommend?
Ideally, development gets read-only access to prod. When even that cannot be granted, the fallback is a snapshot of production data written into the dev catalog. Read-write access to prod from development is never recommended.
“If it is not possible to grant read-only access to the prod catalog, a snapshot of production data can be written to the dev catalog”Source: docs.databricks.com
3.The four foundations: Git, Delta, MLflow and Models in Unity Catalog
Access control and versioning hold the strategy together, and Databricks gives each asset type one tool to provide them. Code goes in Git, and Databricks Git folders sync notebooks and source files between the Git provider and the workspace. With pipelines in Git, promoting ML logic is just a branch movement: from the development branch to the staging branch, then to the release branch.
| Asset | Tool | What it provides |
|---|---|---|
| Pipelines and code | Git, via Databricks Git folders | Version control; promotion as dev, staging and release branches |
| Raw data and feature tables | Delta tables in a lakehouse | Storage in your cloud account with access controls on who can read and modify |
| Model development | MLflow | Tracking of code snapshots, parameters, metrics and other metadata |
| Model lifecycle | Models in Unity Catalog | Versioning, governance and deployment status |
Data lives in a lakehouse architecture in your own cloud account. Raw data and feature tables are both stored as Delta tables, so the same access controls decide who can read or change either one. MLflow records the development process, with parameters, metrics, artifacts and code snapshots for each run. That record links a final model to the data it was trained on and the code that produced it.
Models in Unity Catalog is the registry, and it decides whether the strategy can scale beyond one workspace. Picture a company with several workspaces per business unit. It needs one source of truth for which models are approved and an audit trail of who accessed each version. Teams sometimes try to get this by keeping model files in a shared storage bucket, or by looking models up in MLflow tracking experiments. Models in Unity Catalog brings Unity Catalog's centralized access control, auditing, lineage and model discovery to ML models across workspaces, and it handles deployment through aliases. A shared bucket holds files but offers none of that governance. A tracking experiment records runs, not approvals or deployment status. The full comparison with the legacy workspace registry is in Unity Catalog registry vs workspace registry.
Because Delta tables carry the same access controls across environments. That makes the dev, staging and prod separation enforceable for data, and the same tables can be versioned and traced through lineage.
Checkpoint 3 of 9· Match them up
Your team is setting up the foundations of an MLOps strategy on Databricks. Pair each recommended tool with the job it does in that strategy.
Tap a term, then the definition that fits it.
Databricks gives each asset type one tool. Git handles code and promotion through branches. Delta handles access-controlled data. MLflow tracks model development. Models in Unity Catalog manages the model lifecycle, including deployment status through aliases.
“Use Models in Unity Catalog to manage the model lifecycle. Use Models in Unity Catalog to manage model versioning, governance, and deployment status.”Source: docs.databricks.com
Checkpoint 4 of 9· Exam question
A company runs several Databricks workspaces per business unit and wants a single source of truth for which models are approved for production, along with a full audit trail of who accessed each model version. Which registry setup best supports this MLOps requirement?
Correct answer: A — Register models in Unity Catalog, since it centralizes governance, access auditing, and lineage across every attached workspace.
- A. Unity Catalog's model registry centralizes access control, auditing, and lineage tracking, and because catalogs can be shared across workspaces attached to the same metastore, it gives one governed source of truth for approved models.
- B. The legacy workspace registry is scoped to a single workspace and has no built-in cross-workspace governance, so manually exporting stage information does not provide real auditing or a unified source of truth.
- C. Shared object storage access grants file-level read permissions but carries none of the model versioning, alias, or audit metadata that a registry provides, so it cannot answer which version is approved for production.
- D. Querying another workspace's tracking experiment over the API exposes run metadata but not registry-level governance features like access control or approved-version tracking across business units.
4.The top-level decision: promote code, not models
Every strategy has to decide what moves from one environment to the next: the trained model artifact or the training code that produces it. In most situations Databricks recommends promoting code, and the recommended MLOps workflow is built around that choice. The criteria for choosing the other pattern, along with the hybrid option, are covered in Deploy code vs deploy models (and the hybrid pattern). What matters here is what the default implies for the pipeline.
Under deploy code, the model is retrained in every environment. The same code is trained in development during model development, then in staging on a limited subset of data as part of integration tests, then in production on the full production data. The production job registers its own new version to the prod catalog. Copying the staging artifact across, re-uploading an exported run, or pointing production at the staging tracking server would all skip that production run. The first of these is a different pattern, deploy models, where the artifact is built once in development and then moved forward.
The reason for the default is review. When code is what gets promoted, everything in the ML process goes through the same code review and integration testing, and the production model is guaranteed to be trained on production code. Automated retraining becomes safe, because the code that retrains is the code that was approved. A hybrid also exists for teams that must train in staging on full production data: deploy code to staging, train there, then deploy the model to production.
Checkpoint 5 of 9· Check yourself
In a design review, an ML engineer wants the model serving production to have passed code review and integration testing, and wants automated retraining in production to be safe. Following the Databricks default, what should the team's pipeline move from staging into production?
Databricks recommends promoting code, not models, in most situations. The production model is then retrained by reviewed, tested code on full production data. Copying or reusing the staging or development artifact skips that production run, and moving the artifact forward is a different pattern: deploy models.
“It also ensures that the production version of the model is trained on production code.”Source: docs.databricks.com
Checkpoint 6 of 9· Exam question
A team runs identical training pipeline code in dev, staging, and production Databricks workspaces, and retraining is cheap because the dataset is small. Following Databricks' recommended MLOps strategy, how should a validated model move into production?
Correct answer: A — Promote the pipeline code into the production workspace so the production job retrains on production data and registers its own fresh model version.
- A. This matches Databricks' code-first promotion guidance: promoting the pipeline through environments and retraining in production keeps the deployed model consistent with production data and infrastructure rather than a possibly stale artifact.
- B. Copying a serialized artifact between environments bypasses retraining on production data and skips the governance and reproducibility benefits of running the pipeline where it will serve, so it is not the recommended approach when retraining is cheap.
- C. Re-uploading an artifact as a new run without rerunning the training code in production leaves the production environment without a reproducible pipeline, undermining lineage and future retraining.
- D. Having production depend on staging's tracking server couples environments together and removes the isolation MLOps practices rely on, since a change in staging would silently affect production.
5.The automated train, validate, deploy chain
In the recommended architecture, the promoted code runs as one multitask Databricks workflow with three tasks in order: model training, then model validation, then model deployment. All three pipelines are written in development alongside the training code. The training task produces a model URI, and task values pass that URI on to the validation task, so each step works on exactly the version the previous step registered.
| Task | Does | Outcome |
|---|---|---|
| Training | Trains and tunes, logs parameters, metrics and the model artifact to MLflow, registers to the environment's catalog | A model URI passed on as a task value |
| Validation | Loads the model from Unity Catalog and runs checks such as format, required metadata, compliance, performance on data slices | Pass: version gets the Challenger alias. Fail: the process ends, optionally with a notification |
| Deployment | Promotes Challenger to Champion directly, or compares Challenger against the current Champion first; can set up Model Serving endpoints | The Champion alias points at the new version |
Aliases change at two places in the chain. How Champion and Challenger work is covered in Model aliases (Champion / Challenger). The validation task is a gate: its main job is to decide whether a model moves on to deployment. If the checks pass, it assigns Challenger to the new version. It never touches Champion. The deployment task is the one that reassigns Champion. It either promotes the Challenger straight away or first compares it with the current Champion.
That reassignment is the whole deployment. Production inference pipelines load the registered model by its Champion alias, so when Champion moves to a new version, the next inference run picks it up automatically. Nobody renames the model, reconfigures an endpoint to point at a new name, or deletes the old version. Deployment is decoupled from inference, and the previous version stays in the registry under the same name.
Checkpoint 7 of 9· Put it in order
Promoted code runs as the recommended multitask workflow, and the run ends with a new Champion. Put the steps of that run in order.
- 1.The deployment task moves the Champion alias to the Challenger, either straight away or after comparing it with the current Champion
- 2.The validation task loads that version from Unity Catalog, runs its checks and, if they pass, assigns it the Challenger alias
- 3.The training task trains and tunes the model, logs it to MLflow and registers a version to the environment's catalog
- 4.The training task passes the new model URI on to the validation task as a task value
The workflow runs training first, then validation, then deployment. Validation acts as a gate and assigns only Challenger. Champion moves only in the deployment task, after the version has passed validation.
“the first task is the model training pipeline, followed by model validation and model deployment tasks. The model training task yields a model URI”Source: docs.databricks.com
Checkpoint 8 of 9· Exam question
A model registered in Unity Catalog as prod.ml_team.churn_model is currently serving traffic under the Champion alias. The ML team retrains a challenger version and wants to evaluate it before it takes over serving. What is the recommended way to manage this transition using Unity Catalog's model registry?
Correct answer: A — Assign the Challenger alias to the new model version, evaluate it, then reassign the Champion alias to that version once it outperforms the current one.
- A. Aliases like
ChampionandChallengerare mutable pointers to specific model versions within one registered model, so evaluating a challenger under its own alias and reassigningChampionafterward is the standard champion/challenger workflow without redeploying serving code. - B. Splitting versions across separate registered model names loses the shared version history and lineage that Unity Catalog tracks for one model, and forces endpoint config changes that aliasing was designed to avoid.
- C. Deleting the current champion version before validating the challenger removes the ability to roll back and discards the audit trail Unity Catalog maintains across versions of the same model.
- D. Moving a model version between catalogs to free up a location is not how alias-based promotion works and adds an unnecessary data-movement step instead of simply repointing an alias.
Sources1
6.MLOps Stacks: the recommended workflow as code
MLOps Stacks turns the whole workflow above into a source-controlled project, which is how deploy code becomes practical. A data scientist or ML engineer runs databricks bundle init mlops-stacks, answers the configuration prompts, and gets a directory that implements Databricks' recommended production workflow. Templates are included for the notebooks, pipelines, per-stage workspaces and CI/CD. When the model development process is code, you can deploy the code instead of the model, and retraining becomes a matter of running that code again.
The default stack has three components:
- ML code: templated notebooks for training, batch inference and similar tasks, which give every team the same modular project structure ready for testing
- ML resources as code: workspaces and pipelines defined in Declarative Automation Bundles, so a change such as a larger instance type for retraining is version-controlled
- CI/CD: GitHub Actions or Azure DevOps workflows that make every production change go through automation, so only tested code reaches prod
A change then follows a fixed path. Data scientists iterate in the development workspace and open a pull request. The PR triggers unit and integration tests in an isolated staging workspace. Once it merges to main, the training and batch inference jobs in staging switch to the latest code. A release branch cut on the team's release schedule then deploys the code changes to production. ML engineers set up service principal secrets so the CI/CD runner can run notebooks and create jobs in staging and production. Data scientists never push to production by hand.
| Component | Tool in Databricks |
|---|---|
| ML model development code | Databricks notebooks, MLflow |
| ML model repository | Models in Unity Catalog |
| ML model serving | Model Serving |
| Infrastructure-as-code | Declarative Automation Bundles |
| Orchestrator | Lakeflow Jobs |
| CI/CD | GitHub Actions, Azure DevOps |
Checkpoint 9 of 9· Put it in order
A data scientist on a team using the default MLOps Stack changes the feature logic in the training notebook. Put the steps that take this change from their workspace into production in order.
- 1.The data scientist iterates on the ML code in the development workspace and opens a pull request
- 2.A release branch is cut on the team's release schedule, and the CI/CD runner deploys the code changes to production
- 3.The pull request is merged to main, and the training and batch inference jobs in staging switch to the latest code
- 4.The pull request triggers unit and integration tests in an isolated staging workspace
In the default MLOps Stack, a change moves through automation as code. A PR from development is tested in staging, merging to main updates the staging jobs, and a scheduled release branch deploys the code to production. Nobody pushes a model to prod by hand.
“When a PR is merged to main, model training and batch inference jobs that run in staging immediately update to run the latest code.”Source: docs.databricks.com
Sources6
Sources
(6)
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“MLOps is a set of processes and automated steps for managing code, data, and models”
↩︎ What an MLOps strategy has to manage“Each execution environment consists of compute instances, their runtimes and libraries, and automated jobs.”
↩︎ Separate dev, staging and prod environments, one catalog each“Data scientists have read-write access to the dev catalog as they create temporary data and feature tables in the development workspace.”
↩︎ Separate dev, staging and prod environments, one catalog each“Ideally, data scientists working in the development workspace also have read-only access to production data in the prod catalog.”
↩︎ Separate dev, staging and prod environments, one catalog each“Set up your pipeline code to register the model to the catalog corresponding to the environment that the model pipeline was executed in”
↩︎ Separate dev, staging and prod environments, one catalog each“Moving ML logic between stages can then be interpreted as moving code from the development branch, to the staging branch, to the release branch.”
↩︎ The four foundations: Git, Delta, MLflow and Models in Unity Catalog“Both raw data and feature tables should be stored as Delta tables with access controls to determine who can read and modify them.”
↩︎ The four foundations: Git, Delta, MLflow and Models in Unity Catalog“Use Models in Unity Catalog to manage model versioning, governance, and deployment status.”
↩︎ The four foundations: Git, Delta, MLflow and Models in Unity Catalog“In most situations, Databricks recommends that during the ML development process, you promote code, rather than models, from one environment to the next.”
↩︎ The top-level decision: promote code, not models“you deploy a multitask Databricks workflow in which the first task is the model training pipeline, followed by model validation and model deployment tasks.”
↩︎ The automated train, validate, deploy chain“You can use task values to pass this URI to the model.”
↩︎ The automated train, validate, deploy chain“The primary function of the model validation pipeline is to determine whether a model should proceed to the deployment step.”
↩︎ The automated train, validate, deploy chain“This pipeline can also set up any required inference infrastructure, such as Model Serving endpoints.”
↩︎ The automated train, validate, deploy chain“In this way the model deployment step is decoupled from inference pipelines.”
↩︎ The automated train, validate, deploy chain“Databricks recommends creating separate environments for the different stages of ML code and model development with clearly defined transitions between stages.”
↩︎ Key concept“It also ensures that the production version of the model is trained on production code.”
↩︎ Exam trap 2“the inference pipeline automatically uses the new version for its next execution.”
↩︎ Exam trap 3“a snapshot of production data can be written to the dev catalog to enable data scientists to develop and evaluate project code.”
↩︎ Exam trap 4“If it is not possible to grant read-only access to the prod catalog, a snapshot of production data can be written to the dev catalog”
↩︎ Checkpoint“Use Models in Unity Catalog to manage the model lifecycle. Use Models in Unity Catalog to manage model versioning, governance, and deployment status.”
↩︎ Checkpoint“It also ensures that the production version of the model is trained on production code.”
↩︎ Checkpoint“the first task is the model training pipeline, followed by model validation and model deployment tasks. The model training task yields a model URI”
↩︎ Checkpoint - 2.
“By automating the building, testing, and deployment of code, development teams can deliver releases more frequently and reliably than manual processes”
↩︎ What an MLOps strategy has to manage“Training data, including data quality, schema changes, and distribution changes.”
↩︎ What an MLOps strategy has to manage“Unity Catalog, which lets admins set up fine-grained access control, security policies, and governance for all data and AI assets across Databricks.”
↩︎ The four foundations: Git, Delta, MLflow and Models in Unity Catalog - 3.https://docs.databricks.com/aws/en/lakehouse-architecture/data-governance/best-practicesOfficial docs
“In the Databricks Data + AI Platform, the Unity Catalog is the central component for governing both data and AI assets”
↩︎ Separate dev, staging and prod environments, one catalog each“Models in Unity Catalog extends the benefits of Unity Catalog to ML models, including centralized access control, auditing, lineage, and model discovery across workspaces.”
↩︎ The four foundations: Git, Delta, MLflow and Models in Unity Catalog - 4.
“USE SCHEMA and USE CATALOG privileges on the schema and its enclosing catalog.”
↩︎ Separate dev, staging and prod environments, one catalog each“The model version's enclosing catalog, schema, and registered model reflect its environment (prod) and associated governance rules”
↩︎ Separate dev, staging and prod environments, one catalog each“To manage the deployment status, use model aliases.”
↩︎ Exam trap 1 - 5.
“Typically an environment (development, staging, or production) corresponds to a catalog in Unity Catalog.”
↩︎ Separate dev, staging and prod environments, one catalog each“The same code moves to staging and then production.”
↩︎ The top-level decision: promote code, not models“In this pattern, the model artifact is generated by training code in the development environment.”
↩︎ The top-level decision: promote code, not models“you can use a hybrid approach by deploying code to staging, training the model, and then deploying the model to production.”
↩︎ The top-level decision: promote code, not models“in the production environment (on the full production data) to produce the final model.”
↩︎ Prediction - 6.
“Representing the model development process as code enables you to deploy the code instead of deploying the model.”
↩︎ MLOps Stacks: the recommended workflow as code“initializes the project using databricks bundle init mlops-stacks”
↩︎ MLOps Stacks: the recommended workflow as code“ensuring that all production changes are performed through automation and that only tested code is deployed to prod.”
↩︎ MLOps Stacks: the recommended workflow as code“PRs trigger unit tests and integration tests in an isolated staging Databricks workspace.”
↩︎ MLOps Stacks: the recommended workflow as code“you can cut a new release branch as part of your scheduled release process and deploy the code changes to production.”
↩︎ MLOps Stacks: the recommended workflow as code“When a PR is merged to main, model training and batch inference jobs that run in staging immediately update to run the latest code.”
↩︎ Checkpoint