Continuous Machine Learning with Kubeflow
eBook - ePub

Continuous Machine Learning with Kubeflow

Performing Reliable MLOps with Capabilities of TFX, Sagemaker and Kubernetes (English Edition)

Aniruddha Choudhury

  1. English
  2. ePUB (handyfreundlich)
  3. Über iOS und Android verfügbar
eBook - ePub

Continuous Machine Learning with Kubeflow

Performing Reliable MLOps with Capabilities of TFX, Sagemaker and Kubernetes (English Edition)

Aniruddha Choudhury

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

An insightful journey to MLOps, DevOps, and Machine Learning in the real environment.

Key Features
? Extensive knowledge and concept explanation of Kubernetes components with examples.
? An all-in-one knowledge guide to train and deploy ML pipelines using Docker and Kubernetes.
? Includes numerous MLOps projects with access to proven frameworks and the use of deep learning concepts.

Description
'Continuous Machine Learning with Kubeflow' introduces you to the modern machine learning infrastructure, which includes Kubernetes and the Kubeflow architecture. This book will explain the fundamentals of deploying various AI/ML use cases with TensorFlow training and serving with Kubernetes and how Kubernetes can help with specific projects from start to finish.This book will help demonstrate how to use Kubeflow components, deploy them in GCP, and serve them in production using real-time data prediction. With Kubeflow KFserving, we'll look at serving techniques, build a computer vision-based user interface in streamlit, and then deploy it to the Google cloud platforms, Kubernetes and Heroku. Next, we also explore how to build Explainable AI for determining fairness and biasness with a What-if tool. Backed with various use-cases, we will learn how to put machine learning into production, including training and serving. After reading this book, you will be able to build your ML projects in the cloud using Kubeflow and the latest technology. In addition, you will gain a solid knowledge of DevOps and MLOps, which will open doors to various job roles in companies.

What you will learn
? Get comfortable with the architecture and the orchestration of Kubernetes.
? Learn to containerize and deploy from scratch using Docker and Google Cloud Platform.
? Practice how to develop the Kubeflow Orchestrator pipeline for a TensorFlow model.
? Create AWS SageMaker pipelines, right from training to deployment in production.
? Build the TensorFlow Extended (TFX) pipeline for an NLP application using Tensorboard and TFMA.

Who this book is for
This book is for MLOps, DevOps, Machine Learning Engineers, and Data Scientists who want to continuously deploy machine learning pipelines and manage them at scale using Kubernetes. The readers should have a strong background in machine learning and some knowledge of Kubernetes is required.

Table of Contents
1. Introduction to Kubeflow & Kubernetes Cloud Architecture
2. Developing Kubeflow Pipeline in GCP
3. Designing Computer Vision Model in Kubeflow
4. Building TFX Pipeline
5. ML Model Explainability & Interpretability
6. Building Weights & Biases Pipeline Development
7. Applied ML with AWS Sagemaker
8. Web App Development with Streamlit & Heroku

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Continuous Machine Learning with Kubeflow als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Continuous Machine Learning with Kubeflow von Aniruddha Choudhury im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Ciencia de la computación & Inteligencia artificial (IA) y semántica. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

CHAPTER 1

Introduction to Kubeflow & Kubernetes Cloud Architecture

In this chapter, we will learn about the complete features of Kubeflow, how it works, and why we need Kubeflow. We will also learn about the architecture functionality of Kubernetes, like service, pod, Ingress, and so on, and how to build the docker image, and how it works. Here, we will see the components of Kubeflow advantage, which we will be using in the upcoming chapters. Then, we will proceed towards the complete setup of Kubeflow in the Google Cloud Platform and Jupyter notebook setup. We have an optional item – how to create the Persistent Volume Claim, and attach it to the File store to save your codes and data.

Structure

In this chapter, we will cover the following topics:
  • Docker understanding
  • Kubernetes concepts and architecture
  • Kubernetes components
  • Introduction on Kubeflow Orchestration for ML Deployment
  • Components of Kubeflow
  • Setting Up for Kubeflow in GCP
  • Jupyter Notebook setup
  • Optional: PVC setup for Jupyter Notebook

Objectives

This chapter will help you learn the following:
  • The core understanding of Docker and Kubernetes, and its application to be used in Cloud.
  • Kubernetes and Kubeflow Architecture and its functionality and advantages.
  • The components of Kubeflow and how to setup Kubeflow IAP Cluster in Google Cloud Platform.
  • Docker image of CPU for setting up the Jupyter notebook, alongside the PVC Setup in Cloud.
NOTE
Rest all the imports I have showed in my Colab Notebook, for which the hyperlink of GitHub account of this chapter is given below. Note Colab platform Python 3.x. RUN IN GOOGLE COLAB
CODE
https://github.com/bpbpublications/Continuous-Machine-Learning-with-Kubeflow/tree/main/Chapter1

1.1 Docker understanding

Docker is a platform for the developers and system admins to build, run, and share the applications with the containers. The containers used to deploy the applications is called containerization. To deploy the applications, the containers are making things easier and flexible.
Containerization is increasingly becoming popular because the containers have the following features:
  • Flexible: We can containerize the most complex applications as well.
  • Scalable: We can distribute the container replica’s process across a data center automatically.
  • Lightweight: The containers make things more efficient than the Virtual machines by sharing and leveraging the host kernel.
  • Portable: Due it’s portable nature, we can build them locally, deploy to the cloud, and run it from anywhere.
  • Loosely coupled: They are highly independent and encapsulated, which allows us to replace or upgrade anyone without disrupting others.
  • Secure: Without any required configuration on the part of the user, it applies aggressive isolations and constraints to the processes.
Images and containers:
Logically, a container is a running process, with some added encapsulated features which applies for the Host to be isolated from it and from the other containers. The most important aspects is that each container interacts with its own private file system, which is called container isolation; the Docker image provides this file system. So, an image includes most of the things which are needed to run an application – the code, runtimes, dependencies, and any other file system objects required.
Figure 1.1: Docker Architecture
The Docker has two concepts which are almost the same with its VM containers as the idea of an image and a container. An image, which is the definition of that will be executed, just like an operating system image, and for a given image, the container is the running instance.

1.1.1 Dockerfile

To get our Python or any language code running in a container is to warp it in a package as a Docker image, after that run a container based on it. The steps are sketched as follows:
Figure 1.2: Docker file process
Next, for generating a Docker image, we need to create a Dockerfile which contains some set of instructions needed to build the image. The Dockerfile is then processed by the Docker builder which generates the Docker image. At last, with a simple Docker run command, we can create and run a container with the Python service.
Figure 1.3: Dockerfile code
Let’s split this file into the following lines:
  • It uses the Python base image with the tag Python:3.8, which is a specific version of Python.
  • Then, it creates a working directory, where we will copy our local files to that directory; here we have created an app folder and copied the requirements file which contains the Python library.
  • Then, we have installed all the Python libraries with the pip command.
  • Next, we use CMD, which is a command to run the Python file whenever the container gets started.
Figure 1.4: Dockerfile command
Now, run the preceding code in the terminal to push the image, which you have built in local to cloud (GCP/AWS/AZURE) and Docker hub.

1.2 Kubernetes Architecture

In this section, we will see how the Kubernetes work, and learn about its architecture.

1.2.1 What is Kubernetes?

Kubernetes is an open-source container management system used in large-scale enterprises in several dynamic industries to perform a mission-critical task or any orchestration task. Some of its capabilities include the following:
  • It manages the containers inside cluster.
  • It deploys applications to which it provides ...

Inhaltsverzeichnis

  1. Cover Page
  2. Title Page
  3. Copyright Page
  4. Dedication Page
  5. About the Author
  6. About the Reviewer
  7. Acknowledgement
  8. Preface
  9. Errata
  10. Table of Contents
  11. 1. Introduction to Kubeflow & Kubernetes Cloud Architecture
  12. 2. Developing Kubeflow Pipeline in GCP
  13. 3. Designing Computer Vision Model in Kubeflow
  14. 4. Building TFX Pipeline
  15. 5. ML Model Explainability & Interpretability
  16. 6. Building Weights & Biases Pipeline Development
  17. 7. Applied ML with AWS SageMaker
  18. 8. Web App Development with Streamlit & Heroku
  19. Index
Zitierstile für Continuous Machine Learning with Kubeflow

APA 6 Citation

Choudhury, A. (2021). Continuous Machine Learning with Kubeflow ([edition unavailable]). BPB Publications. Retrieved from https://www.perlego.com/book/3234779/continuous-machine-learning-with-kubeflow-performing-reliable-mlops-with-capabilities-of-tfx-sagemaker-and-kubernetes-english-edition-pdf (Original work published 2021)

Chicago Citation

Choudhury, Aniruddha. (2021) 2021. Continuous Machine Learning with Kubeflow. [Edition unavailable]. BPB Publications. https://www.perlego.com/book/3234779/continuous-machine-learning-with-kubeflow-performing-reliable-mlops-with-capabilities-of-tfx-sagemaker-and-kubernetes-english-edition-pdf.

Harvard Citation

Choudhury, A. (2021) Continuous Machine Learning with Kubeflow. [edition unavailable]. BPB Publications. Available at: https://www.perlego.com/book/3234779/continuous-machine-learning-with-kubeflow-performing-reliable-mlops-with-capabilities-of-tfx-sagemaker-and-kubernetes-english-edition-pdf (Accessed: 15 October 2022).

MLA 7 Citation

Choudhury, Aniruddha. Continuous Machine Learning with Kubeflow. [edition unavailable]. BPB Publications, 2021. Web. 15 Oct. 2022.