Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Practical Machine Learning on Databricks

You're reading from  Practical Machine Learning on Databricks

Product type Book
Published in Nov 2023
Publisher Packt
ISBN-13 9781801812030
Pages 244 pages
Edition 1st Edition
Languages
Author (1):
Debu Sinha Debu Sinha
Profile icon Debu Sinha

Table of Contents (16) Chapters

Preface Part 1: Introduction
Chapter 1: The ML Process and Its Challenges Chapter 2: Overview of ML on Databricks Part 2: ML Pipeline Components and Implementation
Chapter 3: Utilizing the Feature Store Chapter 4: Understanding MLflow Components on Databricks Chapter 5: Create a Baseline Model Using Databricks AutoML Part 3: ML Governance and Deployment
Chapter 6: Model Versioning and Webhooks Chapter 7: Model Deployment Approaches Chapter 8: Automating ML Workflows Using Databricks Jobs Chapter 9: Model Drift Detection and Retraining Chapter 10: Using CI/CD to Automate Model Retraining and Redeployment Index Other Books You May Enjoy

Using CI/CD to Automate Model Retraining and Redeployment

Having explored various statistical tests in Chapter 9, courtesy of diverse open source libraries on Databricks and their integration with MLflow, we will now focus on an integral component of MLOps on Databricks. In this chapter, we will look at how Databricks unifies DevOps, DataOps, and ModelOps all in a single platform.

In this chapter, we will cover the following topics:

  • Introduction to MLOps
  • Fundamentals of MLOps and deployment patterns

Let’s understand what MLOps is.

Introduction to MLOps

MLOps serves as a multidisciplinary approach that merges the principles of DevOps, ModelOps, and DataOps to facilitate the end-to-end life cycle of ML projects. It aims to streamline the transition from model development to deployment, while also ensuring effective monitoring and management. In this framework, we have the following:

  • DevOps: This focuses on the continuous integration and deployment of code, aiming for quicker releases and more reliable software
  • ModelOps: This specializes in managing ML models, ensuring they are effectively trained, validated, and deployed
  • DataOps: This deals with data management practices, encompassing everything from data collection and preprocessing to storage and analytics

MLOps improves the performance, stability, and long-term efficiency of ML systems. There are two primary risks that MLOps can help mitigate for your use case and industry:

  • Technical risks: These result from poorly managed models...

Fundamentals of MLOps and deployment patterns

To effectively manage MLOps, it’s essential to first familiarize ourselves with its underlying terminology and structure. This includes understanding the roles and responsibilities associated with various operational environments – namely, development (dev), staging, and production (prod). Let’s dissect what these environments signify in a practical MLOps framework.

Within any ML project, there are three pivotal assets:

  • Code base: This serves as the project’s blueprint. It contains all the source code related to data preprocessing, model training, evaluation, and deployment.
  • Data: This includes the datasets that are used for training, validating, and testing the model. The quality and availability of this data directly influence the model’s efficacy.
  • Trained model: This is the culmination of your ML workflow, a model that has been trained, evaluated, and prepared for inference.
...

Understanding ML deployment patterns

The ultimate goal of any ML project is to get our ML model into production. Depending on what kind of use case we are catering to and how sophisticated our ML engineering team is, there are two broad ML deployment approaches:

  • The deploy models approach
  • The deploy code approach

Let’s understand these approaches one by one.

The deploy models approach

The model deployment workflow adheres to a structured methodology, beginning in a development environment where code for training the ML model is both crafted and refined. After the model undergoes training and the optimal version is ascertained, it is formally registered within a specialized model registry. This is followed by a battery of integration tests to evaluate its performance and reliability. Upon successfully passing these assessments, the model is first elevated to a staging environment for further validation. Once it meets all requisite criteria, it is then...

Summary

In this chapter, we covered the basics of MLOps, the different deployment approaches on Databricks, and their reference architectures.

Selecting a model deployment approach should be based on your team’s proficiency in implementing DevOps processes for ML projects. It’s important to acknowledge that there is no universal solution as each approach we have discussed has its own advantages and disadvantages. However, it is possible to create a customized hybrid ModelOps architecture within the Databricks environment.

By considering your team’s strengths and expertise, you can determine the most suitable deployment approach for your project. It’s essential to assess scalability, maintainability, ease of deployment, and integration with existing infrastructure. Evaluating these aspects will help you make an informed decision and optimize the model deployment process.

In Databricks, you have the flexibility to tailor your ModelOps architecture...

Further reading

Please go through the following sources and their links to learn more about the topics that were covered in the chapter:

  1. The Big Book of MLOps: bit.ly/big-book-of-mlops
  2. MLOps Stack on GitHub: https://github.com/databricks/mlops-stack
  3. Damji, J. S., Wenig, B., Das, T., and Lee, D. (2020). Learning Spark (2nd ed.)
lock icon The rest of the chapter is locked
You have been reading a chapter from
Practical Machine Learning on Databricks
Published in: Nov 2023 Publisher: Packt ISBN-13: 9781801812030
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}