Book Image

Machine Learning on Kubernetes

By : Faisal Masood, Ross Brigoli
Book Image

Machine Learning on Kubernetes

By: Faisal Masood, Ross Brigoli

Overview of this book

MLOps is an emerging field that aims to bring repeatability, automation, and standardization of the software engineering domain to data science and machine learning engineering. By implementing MLOps with Kubernetes, data scientists, IT professionals, and data engineers can collaborate and build machine learning solutions that deliver business value for their organization. You'll begin by understanding the different components of a machine learning project. Then, you'll design and build a practical end-to-end machine learning project using open source software. As you progress, you'll understand the basics of MLOps and the value it can bring to machine learning projects. You will also gain experience in building, configuring, and using an open source, containerized machine learning platform. In later chapters, you will prepare data, build and deploy machine learning models, and automate workflow tasks using the same platform. Finally, the exercises in this book will help you get hands-on experience in Kubernetes and open source tools, such as JupyterHub, MLflow, and Airflow. By the end of this book, you'll have learned how to effectively build, train, and deploy a machine learning model using the machine learning platform you built.
Table of Contents (16 chapters)
1
Part 1: The Challenges of Adopting ML and Understanding MLOps (What and Why)
5
Part 2: The Building Blocks of an MLOps Platform and How to Build One on Kubernetes
10
Part 3: How to Use the MLOps Platform and Build a Full End-to-End Project Using the New Platform

Building and tuning your model using JupyterHub

As a data scientist, you will want to try different models with different parameters to find the right fit. Before you start building the model, recall from Chapter 8, Building a Complete ML Project Using the Platform, that you need to define the evaluation criteria, and that accuracy may be a misleading criterion for a lot of use cases.

For the flight use case, let's assume that your team and the SME agree on the PRECISION metric. Note that precision measures the portion of correct positive identification in the provided dataset.

Let's start writing our model and see how the platform enables data scientists to perform their work efficiently:

  1. Open the chapter10/experiments.ipynb file notebook in your JupyterHub environment.
  2. In Cell 2, add the connection information to MLflow. Recall that MLflow is the component in the platform that records the model experiments and works as the model registry. In the code,...