ML runtimes and MLOps best practices
Databricks Machine Learning Associate · Lesson 1 of 19 · 4:03
YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗
Learning with these videos? Subscribe for new courses and exam-style questions.
Subscribe on YouTube (opens in a new tab)In this lesson
Prepare for the Databricks Certified Machine Learning Associate exam. In this lesson: the Databricks Runtime for Machine Learning and its preinstalled libraries, GPU compute, notebook-scoped libraries, what MLOps means, one tool for each asset (code, data, and models), and the recommended workflow across development, staging, and production. Includes three original practice questions.
Study notes
The text of this lesson, to read at your own pace. Information as of November 2026.
Models nobody can trace
Juniper Rides wants to forecast ride demand at every station, but each data scientist installs libraries by hand on a personal cluster, and copies the best model into production from a notebook. Last month, nobody could say which code or which data had produced the model that was running. This lesson covers the advantages of the Databricks Runtime for Machine Learning, and the best practices of an MLOps strategy.
ML runtimes
The Databricks Runtime for Machine Learning creates compute with the machine learning and deep learning infrastructure already in place. Popular libraries come pre-installed, like scikit-learn, XGBoost, PyTorch, TensorFlow, MLflow, and the Feature Engineering client, and Databricks supports, tests, and optimizes a top tier set of them, updated with each release. To use it, you select the Machine learning checkbox when you create the compute, which sets the access mode to dedicated, and you pick a GPU instance type for deep learning. You can still add libraries for the whole compute, or for a single notebook. Recent ML runtimes no longer include Hyperopt or AutoML, and for deep learning on GPUs, Databricks now recommends AI Runtime, its serverless GPU offering.
What MLOps means
MLOps is a set of processes and automated steps to manage code, data, and models, so that machine learning systems stay reliable and efficient over time. It combines DevOps for code, DataOps for data, and ModelOps for models. Assets move through stages, from development, where access is open and testing is light, through staging, to production, which is tightly controlled. Databricks recommends a separate environment for each stage, with clear transitions, for example one catalog in Unity Catalog per stage: dev, staging, and prod. Ideally, data scientists can read production data from development, but not change it.
One tool per asset
Each kind of asset has its tool. Code is stored in Git, synced with the workspace through Git folders, so that moving logic between stages means moving code from a development branch to a release branch. Data and feature tables are Delta tables in the lakehouse, with access controls on who can read and change them. MLflow tracks model development: parameters, metrics, code versions, and artifacts. And models in Unity Catalog manage versions, governance, and deployment status, while in most cases, you promote code rather than models, as lesson seven explains.
The recommended workflow
The recommended workflow has three stages. In development, data scientists explore the data, write feature, training, and inference code in a development branch, track experiments with MLflow, and register candidate models in the dev catalog. In staging, the code is tested, and integration tests run the whole pipeline on a limited subset of data, before the code is merged into the main branch. In production, automated jobs compute features, retrain the model on the full production data, validate it against the current model, and deploy it. A Lakeflow job with several tasks chains training, validation, and deployment, and passes the model's URI from one task to the next with task values. And monitoring closes the loop: when the data drifts or the quality drops, retraining starts again.
Recap
Let's recap. The ML runtime comes with machine learning and deep learning libraries pre-installed and tested together, with GPU support, and without Hyperopt or AutoML in recent versions. MLOps manages code, data, and models across development, staging, and production, ideally with one catalog per stage. Code goes in Git, data in Delta tables, experiments in MLflow, and models in Unity Catalog. Staging tests the code on a subset of data, and production retrains, validates, and deploys automatically. And monitoring triggers retraining when the data or the quality changes.
Quick checks for this lesson
The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.
Every new cluster at Juniper Rides takes an hour of library installs before training, and the versions of scikit-learn, XGBoost, and MLflow sometimes conflict. What should the team use?
- The Databricks Runtime for Machine Learning
- A standard runtime with an init script for the installs
- A standard runtime with a larger driver node
- Photon turned on in a standard runtime
Show the answer
The Databricks Runtime for Machine Learning
The ML runtime comes with these libraries pre-installed, in versions that Databricks tests together. “A standard runtime with an init script for the installs” would keep the manual installs, and the conflicts, in a script. “A standard runtime with a larger driver node” would only add power, and the libraries would still be missing. And “Photon turned on in a standard runtime” would speed up Spark SQL and DataFrames, and would install no library.
Data scientists at Juniper Rides test new models directly against the production catalog, and one of them overwrote a production feature table by mistake. What does Databricks recommend?
- Daily backups of the production catalog
- One shared cluster for every data scientist
- Dev, staging, and prod, with read-only access to prod
- Stricter code reviews, while training stays in prod
Show the answer
Dev, staging, and prod, with read-only access to prod
Separate environments keep experiments away from production, while read only access still lets data scientists study production data. “Daily backups of the production catalog” would only restore the table after the damage is done. “One shared cluster for every data scientist” would share compute, and change nothing about who can write to production. And “Stricter code reviews, while training stays in prod” would keep everyone working in production, which is what caused the mistake.
The training code for the demand model was reviewed, merged, and run in production, which produced a new model version. What should happen before it replaces the current one?
- Retrain it in the development workspace
- Delete the current production version
- Copy its runs to the production catalog
- Validate it against the current model
Show the answer
Validate it against the current model
The validation step checks that the new version performs at least as well as the current production model. “Retrain it in the development workspace” would train it again in development, away from the production data. “Delete the current production version” would remove the version that is still serving, before the new one is proven. And “Copy its runs to the production catalog” would only move run history, and would check nothing.