0%

Get up and running, and productive in no time with MLflow using the most effective machine learning engineering approach

Key Features

  • Explore machine learning workflows for stating ML problems in a concise and clear manner using MLflow
  • Use MLflow to iteratively develop a ML model and manage it
  • Discover and work with the features available in MLflow to seamlessly take a model from the development phase to a production environment

Book Description

MLflow is a platform for the machine learning life cycle that enables structured development and iteration of machine learning models and a seamless transition into scalable production environments.

This book will take you through the different features of MLflow and how you can implement them in your ML project. You will begin by framing an ML problem and then transform your solution with MLflow, adding a workbench environment, training infrastructure, data management, model management, experimentation, and state-of-the-art ML deployment techniques on the cloud and premises. The book also explores techniques to scale up your workflow as well as performance monitoring techniques. As you progress, you'll discover how to create an operational dashboard to manage machine learning systems. Later, you will learn how you can use MLflow in the AutoML, anomaly detection, and deep learning context with the help of use cases. In addition to this, you will understand how to use machine learning platforms for local development as well as for cloud and managed environments. This book will also show you how to use MLflow in non-Python-based languages such as R and Java, along with covering approaches to extend MLflow with Plugins.

By the end of this machine learning book, you will be able to produce and deploy reliable machine learning algorithms using MLflow in multiple environments.

What you will learn

  • Develop your machine learning project locally with MLflow's different features
  • Set up a centralized MLflow tracking server to manage multiple MLflow experiments
  • Create a model life cycle with MLflow by creating custom models
  • Use feature streams to log model results with MLflow
  • Develop the complete training pipeline infrastructure using MLflow features
  • Set up an inference-based API pipeline and batch pipeline in MLflow
  • Scale large volumes of data by integrating MLflow with high-performance big data libraries

Who this book is for

This book is for data scientists, machine learning engineers, and data engineers who want to gain hands-on machine learning engineering experience and learn how they can manage an end-to-end machine learning life cycle with the help of MLflow. Intermediate-level knowledge of the Python programming language is expected.

Table of Contents

  1. Machine Learning Engineering with MLflow
  2. Contributors
  3. About the author
  4. About the reviewer
  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. Share Your Thoughts
  6. Section 1: Problem Framing and Introductions
  7. Chapter 1: Introducing MLflow
    1. Technical requirements
    2. What is MLflow?
    3. Getting started with MLflow
    4. Developing your first model with MLflow
    5. Exploring MLflow modules
    6. Exploring MLflow projects
    7. Exploring MLflow tracking
    8. Exploring MLflow Models
    9. Exploring MLflow Model Registry
    10. Summary
    11. Further reading
  8. Chapter 2: Your Machine Learning Project
    1. Technical requirements 
    2. Exploring the machine learning process
    3. Framing the machine learning problem
    4. Problem statement
    5. Success and failure definition
    6. Model output
    7. Output usage
    8. Heuristics
    9. Data layer definition
    10. Introducing the stock market prediction problem
    11. Stock movement predictor
    12. Problem statement
    13. Success and failure definition
    14. Model output
    15. Output usage
    16. Heuristics
    17. Data layer definition
    18. Sentiment analysis of market influencers
    19. Problem statement
    20. Success and failure definition
    21. Model output
    22. Output usage
    23. Heuristics
    24. Data layer definition
    25. Developing your machine learning baseline pipeline
    26. Summary
    27. Further reading
  9. Section 2: Model Development and Experimentation
  10. Chapter 3: Your Data Science Workbench
    1. Technical requirements 
    2. Understanding the value of a data science workbench
    3. Creating your own data science workbench
    4. Building our workbench
    5. Using the workbench for stock prediction
    6. Starting up your environment
    7. Updating with your own algorithms
    8. Summary
    9. Further reading
  11. Chapter 4: Experiment Management in MLflow
    1. Technical requirements
    2. Getting started with the experiments module
    3. Defining the experiment
    4. Exploring the dataset
    5. Adding experiments
    6. Steps for setting up a logistic-based classifier
    7. Comparing different models
    8. Tuning your model with hyperparameter optimization
    9. Summary
    10. Further reading
  12. Chapter 5: Managing Models with MLflow
    1. Technical requirements
    2. Understanding models in MLflow
    3. Exploring model flavors in MLflow
    4. Custom models
    5. Managing model signatures and schemas
    6. Introducing Model Registry
    7. Adding your best model to Model Registry
    8. Managing the model development life cycle
    9. Summary
    10. Further reading
  13. Section 3: Machine Learning in Production
  14. Chapter 6: Introducing ML Systems Architecture
    1. Technical requirements
    2. Understanding challenges with ML systems and projects
    3. Surveying state-of-the-art ML platforms
    4. Getting to know Michelangelo
    5. Getting to know Kubeflow
    6. Architecting the PsyStock ML platform
    7. Describing the features of the ML platform
    8. High-level systems architecture
    9. MLflow and other ecosystem tools
    10. Summary
    11. Further reading
  15. Chapter 7: Data and Feature Management
    1. Technical requirements
    2. Structuring your data pipeline project
    3. Acquiring stock data
    4. Checking data quality
    5. Generating a feature set and training data
    6. Running your end-to-end pipeline
    7. Using a feature store
    8. Summary
    9. Further reading
  16. Chapter 8: Training Models with MLflow
    1. Technical requirements
    2. Creating your training project with MLflow
    3. Implementing the training job
    4. Evaluating the model
    5. Deploying the model in the Model Registry
    6. Creating a Docker image for your training job
    7. Summary
    8. Further reading
  17. Chapter 9: Deployment and Inference with MLflow
    1. Technical requirements
    2. Starting up a local model registry
    3. Setting up a batch inference job
    4. Creating an API process for inference
    5. Deploying your models for batch scoring in Kubernetes
    6. Making a cloud deployment with AWS SageMaker
    7. Summary
    8. Further reading
  18. Section 4: Advanced Topics
  19. Chapter 10: Scaling Up Your Machine Learning Workflow
    1. Technical requirements
    2. Developing models with a Databricks Community Edition environment
    3. Integrating MLflow with Apache Spark
    4. Integrating MLflow with NVIDIA RAPIDS (GPU)
    5. Integrating MLflow with the Ray platform
    6. Summary
    7. Further reading
  20. Chapter 11: Performance Monitoring
    1. Technical requirements
    2. Overview of performance monitoring for machine learning models
    3. Monitoring data drift and model performance
    4. Monitoring data drift
    5. Monitoring target drift
    6. Monitoring model drift
    7. Infrastructure monitoring and alerting
    8. Summary
    9. Further reading
  21. Chapter 12: Advanced Topics with MLflow
    1. Technical requirements
    2. Exploring MLflow use cases with AutoML
    3. AutoML pyStock classification use case
    4. AutoML – anomaly detection in fraud
    5. Integrating MLflow with other languages
    6. MLflow Java example
    7. MLflow R example
    8. Understanding MLflow plugins
    9. Summary
    10. Further reading
    11. Why subscribe?
  22. Other Books You May Enjoy
    1. Packt is searching for authors like you
    2. Share Your Thoughts
3.89.56.228