cancel
Showing results for 
Search instead for 
Did you mean: 
Technical Blog
Explore in-depth articles, tutorials, and insights on data analytics and machine learning in the Databricks Technical Blog. Stay updated on industry trends, best practices, and advanced techniques.
cancel
Showing results for 
Search instead for 
Did you mean: 
antonv
Databricks Employee
Databricks Employee

Picture this: a data science team cracks a breakthrough model to predict customer churn with stunning accuracy. Excited, they want to go to production—only to hit a wall: mismatched environments, missing dependencies, inconsistent configurations. What worked in the notebook now breaks in deployment. Sound familiar?

As organizations scale Machine Learning (ML) and GenAI, and adopt advanced AI use cases, these growing pains are common. The need for scalable, efficient MLOps has never been greater. ML in production isn’t just about accuracy—it requires automation, reproducibility, and continuous monitoring. Without a solid structure, ML workflows become fragmented, unreliable, and hard to scale.

That’s where Databricks Asset Bundles (DABs) and customizable MLOps Stacks come in. These tools together offer a fast, structured, adaptable way to package, deploy, and manage ML assets on the Databricks Data Intelligence Platform—simplifying lifecycle management at scale.

This blog is for data practitioners and platform teams working with Databricks to navigate ML deployment complexity. We show how MLOps with Databricks Asset Bundles tackles common enterprise challenges, with a hands-on tutorial using a customizable template for production-grade ML workflows.

Challenges

Let’s zoom in on the challenges. Most organizations have business-aligned data scientist teams and central data platform teams responsible for cloud ML infrastructure. As more teams adopt ML and onboard data platforms, managing ML/AI projects individually—especially in production—becomes unsustainable. Data scientists need a fast feedback loop to test model iterations while platform engineers require oversight, governance and security in the cloud. Without a good way to meet each team’s needs, collaboration becomes chaotic, operational overhead increases, progress slows, and ML projects often don’t ship.

This complexity stems from:

  • Misaligned Priorities between the two streams – data scientists build custom models; engineers build shared infrastructure.
  • Data scientists need to manage a lot of artifacts: ML models rely on multiple configurations—data versions, model files, Python packages, pytest files—making deployment error-prone.
  • Platform engineers need a scalable way to manage ML: Manual model management across deployment environments and regions increases risk.

Every deployment feels like reinventing the wheel with slight modifications, wasting time that could be spent improving models—or even better, working on other exciting projects:

antontrulybrick_0-1746710861393.png

Databricks provides the answer: a framework that balances flexibility for data scientists with efficiency for platform engineers.

Scalable ML Pipeline Foundation

MLOps (Operations for Machine Learning) applies DevOps principles to ML, which emphasises automation, standardization, and end-to-end observability. It helps teams to:

  • Ensure consistent model training and validation across deployments.
  • Govern data, model, and artifacts with versioning and auditability to meet organizational and regulatory policies.
  • Reduce friction between data scientists, engineers, and operations through a shared framework.

By combining proven architecture patterns from the Big Book of MLOps with Databricks Asset Bundles, a framework for packaging code, configurations, and dependencies, organizations gain a structured approach to tackle the challenges.

Let’s take a look at these two layers:

(1) A Modular Approach: Databricks Asset Bundles

The Data Intelligence Platform provides the foundation—ML Runtime, Model Serving, and Lakehouse Monitoring. Databricks Asset Bundles streamline how teams use and deploy ML/AI products on the Platform’s foundations.

Databricks Asset Bundles (DABs) are a declarative framework designed to streamline the packages, versioning, deployment and management of ML applications on Databricks platform. They encapsulate all necessary components, and the tools to build and manage data and ML workflows, such as:

  • Models & Dependencies – Ensuring consistent execution across environments.
  • Compute Resources – Standardizing ML pipeline steps to reduce ad hoc scripts.
  • CI/CD Integration – Enabling seamless deployment and rollback.

With DABs, organizations can modularize ML deployments, making it easier to scale and maintain models without manual overhead by interacting via CLI inputs to get a boilerplate project, ready to be deployed to a given environment or region (mapping to a Databricks workspace)

antontrulybrick_1-1746710861201.png

(2) A Unified Solution: MLOps on Asset Bundles

Now by integrating MLOps with Databricks Asset Bundles:

  • Platform Engineers shift focus from individual ML projects to building reusable infrastructure. By customizing the Databricks MLOps Stacks repo with DABs, they ensure DevOps align with enterprise needs.
  • Data Scientists & ML Engineers leverage pre-built MLOps Stacks with DABs, enabling self-service deployment. This accelerates iteration cycles while maintaining governance.

MLOps Stacks combines MLOps with DABs. The template repo has two layers, the template itself and the data science project inside it. In turn, data scientists work with the project, and platform engineers govern the template:

antontrulybrick_2-1746710861395.png

Customize & Maintain MLOps Stacks

Platform engineers serve data scientists as end users. To support this, MLOps Stacks not only provide the reference ML project but also enable customizations that align with the requirements of your ML organization:

  • Code Reuse—helper functions and global variables for code reuse
  • Validation rules for user inputs
  • Parameterization—variables with defaults that get substituted into .tmpl files when a Stack gets initialized

The team can first create a repository fork of MLOps Stacks in your central git organization:

gh repo fork https://github.com/databricks/mlops-stacks ––org “my-org”

The repository consists of two layers: the individual ML project (in the green box), and the general ML resources and reusable helper functions (in the red box).

antontrulybrick_3-1746710861412.png

Let’s have a look at the two layers of the repository and how to use them:

Path for Data Scientists

  1. Traditionally, the data scientists would only initiate the Databricks Asset bundles for their ML projects (the green box above), or the my_mlops_project folder below: 

antontrulybrick_4-1746710861390.png

2. The Stack creates a /tests/ folder where you can drop in unit tests for your ML project:

antontrulybrick_5-1746710861599.png

Path for Platform Engineers

  1. Update the databricks_template_schema.json to adjust CLI inputs for data scientists, such as cloud platform, CI/CD provider, and target Catalog/Schema. These inputs will populate fields like {{.input_root_dir}} (note the dot), either in file content or file names:

antontrulybrick_6-1746710861402.png

In turn, on stack initialization, the placeholder becomes my_mlops_project, and so on.

Template:

custom-mlops-stack/template/{{.input_root_dir}}/{{template `project`.}}/deployment/batch_inference/predict.py.tmpl

Data scientist side:

my_mlops_project/my_mlops_project/deployment/batch_inference/predict.py

Notes: 

  • The template JSON includes a skip_prompt_if block to reduce CLI prompts for a smoother user experience. Any changes to variable names or the addition/removal of variables must be updated in library/template_variables.tmpl.
  • Ensure the template follows this structure: databricks_template_schema.json in the root folder and databricks.yml.tmpl in the project template folder.

2. Update the template folder for ML projects, adjust the CI/CD workflows (.azure, .github, .gitlab), and test the changes with template-level tests in your custom repo:

antontrulybrick_7-1746710861194.png

Note: These tests do not cover project-specific tests, such as training scripts typically run by data scientists.

Best Practices

When customizing MLOps Stacks, we recommend you:

  • Retain only relevant resources and configurations for easier maintenance at scale.
  • Keep templates generalized to suit various ML use cases across your organization.
  • Use Git to track updates, document the user journey in the README, and version your fork (e.g., with GitHub Releases).
  • Create a developer-facing root README for updating the centrally maintained template. 
  • Automate testing at the template and project levels using the reference CI/CD workflow on pull requests.

This approach allows data scientists to clone, iterate on, and deploy models efficiently, while platform teams ensure oversight and improve the template, balancing flexibility and governance to scale MLOps.

Conclusion

Scaling MLOps effectively isn’t just about deploying models—it’s about building a sustainable ML ecosystem. Organizations often face fragmented workflows, deployment complexity, and collaboration bottlenecks. Without a standardized approach, Data scientists spend more time on infrastructure and alignment with platform teams than on innovation.

MLOps Stacks on Databricks Asset Bundles are essential for accelerating ML use cases in production. Platform engineers can shift their focus from individual projects to reusable infrastructure, while data scientists and ML engineers deploy models independently. The key to success lies in balancing flexibility with governance.

By integrating MLOps best practices with Databricks Asset Bundles, teams scale ML operations on the Data Intelligence Platform, reduce deployment friction, and unlock business value at scale.

Next Steps

It’s time to put this into practice! Databricks MLOps Stacks are a solid starting point—ready to be tailored. Trim them down or extend them with your own ML workflows to fit your needs and accelerate your journey to production.

Already using MLOps templates or Stacks? Share your workflows and lessons learned—we’d love your input to improve the Databricks repo!