0%

Get up and running with machine learning life cycle management and implement MLOps in your organization

Key Features

  • Become well-versed with MLOps techniques to monitor the quality of machine learning models in production
  • Explore a monitoring framework for ML models in production and learn about end-to-end traceability for deployed models
  • Perform CI/CD to automate new implementations in ML pipelines

Book Description

MLOps is a systematic approach to building, deploying, and monitoring machine learning (ML) solutions. It is an engineering discipline that can be applied to various industries and use cases. This book presents comprehensive insights into MLOps coupled with real-world examples to help you to write programs, train robust and scalable ML models, and build ML pipelines to train and deploy models securely in production.

The book begins by familiarizing you with the MLOps workflow so you can start writing programs to train ML models. Then you'll then move on to explore options for serializing and packaging ML models post-training to deploy them to facilitate machine learning inference, model interoperability, and end-to-end model traceability. You'll understand how to build ML pipelines, continuous integration and continuous delivery (CI/CD) pipelines, and monitoring pipelines to systematically build, deploy, monitor, and govern ML solutions for businesses and industries. Finally, you'll apply the knowledge you've gained to build real-world projects.

By the end of this ML book, you'll have a 360-degree view of MLOps and be ready to implement MLOps in your organization.

What you will learn

  • Formulate data governance strategies and pipelines for ML training and deployment
  • Get to grips with implementing ML pipelines, CI/CD pipelines, and ML monitoring pipelines
  • Design a robust and scalable microservice and API for test and production environments
  • Curate your custom CD processes for related use cases and organizations
  • Monitor ML models, including monitoring data drift, model drift, and application performance
  • Build and maintain automated ML systems

Who this book is for

This MLOps book is for data scientists, software engineers, DevOps engineers, machine learning engineers, and business and technology leaders who want to build, deploy, and maintain ML systems in production using MLOps principles and techniques. Basic knowledge of machine learning is necessary to get started with this book.

Table of Contents

  1. Engineering MLOps
  2. Contributors
  3. About the author
  4. About the reviewers
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
    4. Download the example code files
    5. Download the color images
    6. Conventions used
    7. Get in touch
    8. Reviews
  6. Section 1: Framework for Building Machine Learning Models
  7. Chapter 1: Fundamentals of an MLOps Workflow
    1. The evolution of infrastructure and software development
    2. The rise of machine learning and deep learning
    3. The end of Moore's law
    4. AI-centric applications
    5. Software development evolution
    6. Traditional software development challenges
    7. Trends of ML adoption in software development
    8. Understanding MLOps
    9. Concepts and workflow of MLOps
    10. Discussing a use case
    11. Summary
  8. Chapter 2: Characterizing Your Machine Learning Problem
    1. The ML solution development process
    2. Types of ML models
    3. Learning models
    4. Hybrid models
    5. Statistical models
    6. HITL models
    7. Structuring your MLOps
    8. Small data ops
    9. Big data ops
    10. Hybrid MLOps
    11. Large-scale MLOps
    12. An implementation roadmap for your solution
    13. Phase 1 – ML development
    14. Phase 2 – Transition to operations
    15. Phase 3 – Operations
    16. Procuring data, requirements, and tools
    17. Data
    18. Requirements
    19. Tools and infrastructure
    20. Discussing a real-life business problem
    21. Summary
  9. Chapter 3: Code Meets Data
    1. Business problem analysis and categorizing the problem
    2. Setting up the resources and tools
    3. Installing MLflow
    4. Azure Machine Learning
    5. Azure DevOps
    6. JupyterHub
    7. 10 principles of source code management for ML
    8. What is good data for ML?
    9. Data preprocessing
    10. Data quality assessment
    11. Calibrating missing data
    12. Label encoding 
    13. New feature – Future_weather_condition
    14. Data correlations and filtering
    15. Time series analysis
    16. Data registration and versioning
    17. Toward the ML Pipeline
    18. Feature Store
    19. Summary
  10. Chapter 4: Machine Learning Pipelines
    1. Going through the basics of ML pipelines
    2. Data ingestion and feature engineering
    3. Data ingestion (training dataset)
    4. Machine learning training and hyperparameter optimization
    5. Support Vector Machine
    6. Random Forest classifier
    7. Model testing and defining metrics
    8. Testing the SVM classifier
    9. Testing the Random Forest classifier
    10. Model packaging
    11. Registering models and production artifacts
    12. Registering production artifacts
    13. Summary
  11. Chapter 5: Model Evaluation and Packaging
    1. Model evaluation and interpretability metrics
    2. Learning models' metrics
    3. Hybrid models' metrics
    4. Statistical models' metrics
    5. HITL model metrics
    6. Production testing methods
    7. Batch testing
    8. A/B testing
    9. Stage test or shadow test
    10. Testing in CI/CD
    11. Why package ML models?
    12. Portability
    13. Inference
    14. Interoperability
    15. Deployment agnosticity
    16. How to package ML models
    17. Serialized files
    18. Packetizing or containerizing
    19. Microservice generation and deployment
    20. Inference ready models
    21. Connecting to the workspace and importing model artifacts
    22. Loading model artifacts for inference
    23. Summary
  12. Section 2: Deploying Machine Learning Models at Scale
  13. Chapter 6: Key Principles for Deploying Your ML System
    1. ML in research versus production
    2. Data
    3. Fairness
    4. Interpretability
    5. Performance
    6. Priority
    7. Understanding the types of ML inference in production
    8. Deployment targets
    9. Mapping the infrastructure for our solution
    10. Hands-on deployment (for the business problem)
    11. Deploying the model on ACI
    12. Deploying the model on Azure Kubernetes Service (AKS)
    13. Deploying the service using MLflow
    14. Understanding the need for continuous integration and continuous deployment
    15. Summary
  14. Chapter 7: Building Robust CI/CD Pipelines
    1. Continuous integration, delivery, and deployment in MLOps
    2. Continuous integration
    3. Continuous delivery
    4. Continuous deployment
    5. Setting up a CI/CD pipeline and the test environment (using Azure DevOps)
    6. Creating a service principal
    7. Installing the extension to connect to the Azure ML workspace
    8. Setting up a continuous integration and deployment pipeline for the test environment
    9. Connecting artifacts to the pipeline
    10. Setting up a test environment
    11. Pipeline execution and testing
    12. Pipeline execution triggers
    13. Summary
  15. Chapter 8: APIs and Microservice Management
    1. Introduction to APIs and microservices
    2. What is an Application Programming Interface (API)?
    3. Microservices
    4. The need for microservices for ML
    5. Hypothetical use case
    6. Stage 1 – Proof of concept (a monolith)
    7. Stage 2 – Production (microservices)
    8. Old is gold – REST API-based microservices
    9. Hands-on implementation of serving an ML model as an API
    10. API design and development
    11. Developing a microservice using Docker
    12. Testing the API
    13. Summary
  16. Chapter 9: Testing and Securing Your ML Solution
    1. Understanding the need for testing and securing your ML application
    2. Testing your ML solution by design
    3. Data testing
    4. Model testing
    5. Pre-training tests
    6. Post-training tests
    7. Hands-on deployment and inference testing (a business use case)
    8. Securing your ML solution by design
    9. Types of attacks
    10. Summary
  17. Chapter 10: Essentials of Production Release
    1. Setting up the production infrastructure
    2. Azure Machine Learning workspace
    3. Azure Machine Learning SDK
    4. Setting up our production environment in the CI/CD pipeline
    5. Testing our production-ready pipeline
    6. Configuring pipeline triggers for automation
    7. Setting up a Git trigger
    8. Setting up an Artifactory trigger
    9. Setting up a Schedule trigger
    10. Pipeline release management
    11. Toward continuous monitoring
    12. Summary
  18. Section 3: Monitoring Machine Learning Models in Production
  19. Chapter 11: Key Principles for Monitoring Your ML System
    1. Understanding the key principles of monitoring an ML system
    2. Model drift
    3. Model bias
    4. Model transparency
    5. Model compliance
    6. Explainable AI
    7. Monitoring in the MLOps workflow
    8. Understanding the Explainable Monitoring Framework
    9. Monitor
    10. Analyze
    11. Govern
    12. Enabling continuous monitoring for the service
    13. Summary
  20. Chapter 12: Model Serving and Monitoring
    1. Serving, monitoring, and maintaining models in production
    2. Exploring different modes of serving ML models
    3. Serving the model as a batch service
    4. Serving the model to a human user
    5. Serving the model to a machine
    6. Implementing the Explainable Monitoring framework
    7. Monitoring your ML system
    8. Analyzing your ML system
    9. Governing your ML system
    10. Summary
  21. Chapter 13: Governing the ML System for Continual Learning
    1. Understanding the need for continual learning
    2. Continual learning
    3. The need for continual learning
    4. Explainable monitoring – governance
    5. Alerts and actions
    6. Model QA and control
    7. Model auditing and reports
    8. Enabling model retraining
    9. Manual model retraining
    10. Automated model retraining
    11. Maintaining the CI/CD pipeline
    12. Summary
    13. Why subscribe?
  22. Other Books You May Enjoy
    1. Packt is searching for authors like you
    2. Leave a review - let other readers know what you think
3.136.18.218