ENGLISH

Machine Learning in Production: Master the art of delivering robust Machine Learning solutions with MLOps

Book information

Publisher
BPB Publications
Year
2023
ISBN
9355518102, 9789355518101
Language
english
Format
PDF
Filesize
39 MB (40870891 bytes)
Pages
458\462
Time added
2023-06-23 08:41:23

Description

Deploy, manage, and scale Machine Learning models with MLOps effortlessly Key Features ● Explore several ways to build and deploy ML models in production using an automated CI/CD pipeline. ● Develop and convert ML apps into Android and Windows apps. ● Learn how to implement ML model deployment on popular cloud platforms, including Azure, GCP, and AWS. Description ‘Machine Learning in Production’ is an attempt to decipher the path to a remarkable career in the field of MLOps. It is a comprehensive guide to managing the machine learning lifecycle from development to deployment, outlining ways in which you can deploy ML models in production. It starts off with fundamental concepts, an introduction to the ML lifecycle and MLOps, followed by comprehensive step-by-step instructions on how to develop a package for ML code from scratch that can be installed using pip. It then covers MLflow for ML life cycle management, CI/CD pipelines, and shows how to deploy ML applications on Azure, GCP, and AWS. Furthermore, it provides guidance on how to convert Python applications into Android and Windows apps, as well as how to develop ML web apps. Finally, it covers monitoring, the critical topic of machine learning attacks, and A/B testing. With this book, you can easily build and deploy machine learning solutions in production. What you will learn ● Master the Machine Learning lifecycle with MLOps. ● Learn best practices for managing ML models at scale. ● Streamline your ML workflow with MLFlow. ● Implement monitoring solutions using whylogs, WhyLabs, Grafana, and Prometheus. ● Use Docker and Kubernetes for ML deployment. Who this book is for Whether you are a Data scientist, ML engineer, DevOps professional, Software engineer, or Cloud architect, this book will help you get your machine learning models into production quickly and efficiently. Table of Contents 1. Python 101 2. Git and GitHub Fundamentals 3. Challenges in ML Model Deployment 4. Packaging ML Models 5. MLflow-Platform to Manage the ML Life Cycle 6. Docker for ML 7. Build ML Web Apps Using API 8. Build Native ML Apps 9. CI/CD for ML 10. Deploying ML Models on Heroku 11. Deploying ML Models on Microsoft Azure 12. Deploying ML Models on Google Cloud Platform 13. Deploying ML Models on Amazon Web Services 14. Monitoring and Debugging 15. Post-Productionizing ML Models Book title Inner title Copyright Dedicated About the Author About the Reviewer Acknowledgement Preface Code Bundle and Coloured Images Piracy Table of Contents Chapter 1: Python101 Introduction Structure Objectives Install Python On Windows and Mac OS On Linux Install Anaconda Install code editor Hello World! Execution of Python file Data structures Common data structures Control statements and loops if…else for loop while loop pass statement Functions Object Oriented Programming (OOP) Numerical Python (NumPy) Reshaping array Pandas loc - selection by label iloc - selection by position Save and load CSV files Save and load Excel files Conclusion Points to remember Multiple choice questions Answers Questions Key terms Chapter 2: Git and GitHub Fundamentals Introduction Structure Objectives Git concepts Git + Hub = GitHub Common Git workflow Install Git and create a GitHub account Linux (Debian/Ubuntu) Git for all platforms GUI clients Create a GitHub account Common Git commands Setup New repository Update Changes Revert Let’s Git Configuration Initialize the Git repository Check Git status Add a new file Conclusion Points to remember Multiple choice questions Answers Questions Chapter 3: Challenges in ML Model Deployment Introduction Structure Objectives ML life cycle Business impact Data collection Data preparation Feature engineering Build and train the model Test and evaluate Model deployment Monitoring and optimization Types of model deployment Batch predictions Web service/REST API Mobile and edge devices Real-time Challenges in deploying models in the production environment Team coordination Data-related challenges Portability Scalability Robustness Security MLOps Benefits of MLOps Efficient management of ML life cycle Reproducibility Automation Tracking and feedback loop Conclusion Points to remember Multiple choice questions Answers Questions Key terms Chapter 4: Packaging ML Models Introduction Structure Objectives Virtual environments Requirements file Serializing and de-serializing ML models Testing Python code with pytest pytest fixtures Python packaging and dependency management Modular programming Module Package Developing, building, and deploying ML packages Business problem Data Building the ML model Developing the package Set up environment variables and paths Build the package Install the package Package usage with example Conclusion Points to remember Multiple choice questions Answers Questions Key terms Chapter 5: MLflow-Platform to Manage the ML Life Cycle Introduction Structure Objectives Introduction to MLflow Set up your environment and install MLflow MLflow components MLflow tracking Log data into the run MLflow projects MLflow models MLflow registry Set up the MySQL server for MLflow Start the MLflow server Conclusion Points to remember Multiple choice questions Answers Questions Chapter 6: Docker for ML Introduction Structure Objectives Introduction to Docker It works on my machine! Long setup Setting up your environment and installing Docker Docker installation Install Docker Engine Docker compose Hello World with Docker Docker objects Create a Dockerfile Build a Docker image Run a Docker container Dockerize and deploy the ML model Common Docker commands Conclusion Points to remember Multiple choice questions Answers Questions Chapter 7: Build ML Web Apps Using API Introduction Structure Objectives REST APIs FastAPI Streamlit Flask Gunicorn NGINX Conclusion Points to remember Multiple choice questions Answers Questions Chapter 8: Build Native ML Apps Introduction Structure Objectives Introduction to Tkinter Hello World app using Tkinter Build an ML-based app using Tkinter Tkinter app Convert Python app into Windows EXE file Build an ML-based app using kivy and kivyMD KivyMD app Convert the Python app into an Android app Conclusion Points to remember Multiple choice questions Answers Questions Chapter 9: CI/CD for ML Introduction Structure Objectives CI/CD pipeline for ML Continuous Integration (CI) Continuous Delivery/Deployment (CD) Continuous Training (CT) Introduction to Jenkins Installation Build CI/CD pipeline using GitHub, Docker, and Jenkins Develop codebase Create a Personal Access Token (PAT) on GitHub Create a webhook on the GitHub repository Configure Jenkins Create CI/CD pipeline using Jenkins Stage 1: 1-GitHub-to-container Stage 2: 2-training Stage 3: 3-testing Stage 4: 4-deployment-status-email Conclusion Points to remember Multiple choice questions Answers Questions Chapter 10: Deploying ML Models on Heroku Introduction Structure Objectives Heroku Setting up Heroku Deployment with Heroku Git Deployment with GitHub repository integration REVIEW APPS STAGING PRODUCTION Heroku Pipeline flow Deployment with Container Registry GitHub Actions Configuration CI/CD pipeline using GitHub Actions and Heroku Conclusion Points to remember Multiple choice questions Answers Questions Chapter 11: Deploying ML Models on Microsoft Azure Introduction Structure Objectives Azure Set up an Azure account Deployment using GitHub Actions Infrastructure setup GitHub Actions Service principal Configure Azure App Service to use GitHub Actions for CD Deployment using Azure DevOps and Azure ML Azure Machine Learning (AML) service Workspace Experiments Runs Configure CI pipeline Configure CD pipeline Conclusion Points to remember Multiple choice questions Answers Questions Chapter 12: Deploying ML Models on Google Cloud Platform Introduction Structure Objectives Google Cloud Platform (GCP) Set up the GCP account Cloud Source Repositories Cloud Build Container Registry Kubernetes Google Kubernetes Engine (GKE) Deployment using Cloud Shell – Manual Trigger CI/CD pipeline using Cloud Build Create a trigger in Cloud Build Conclusion Points to remember Multiple choice questions Answers Questions Chapter 13: Deploying ML Models on Amazon Web Services Introduction Structure Objectives Introduction to Amazon Web Services (AWS) AWS compute services Amazon Elastic Compute Cloud (EC2) Amazon Elastic Container Service (ECS) Amazon Elastic Kubernetes Service (EKS) Amazon Elastic Container Registry (ECR) AWS Fargate AWS Lambda Amazon SageMaker Set up an AWS account AWS CodeCommit Continuous Training Amazon Elastic Container Registry (ECR) Docker Hub rate limit AWS CodeBuild Attach container registry access to CodeBuild’s service role Amazon Elastic Container Service (ECS) AWS ECS deployment models Task definition Load balancing Service CI/CD pipeline using CodePipeline AWS CodePipeline Monitoring Conclusion Points to remember Multiple choice questions Answers Questions Chapter 14: Monitoring and Debugging Introduction Structure Objectives Importance of monitoring Fundamentals of ML monitoring Metrics for monitoring your ML system Drift in ML Types of drift in ML Techniques to detect the drift in ML Addressing the drift in ML Operational monitoring with Prometheus and Grafana ML model monitoring with whylogs and WhyLabs whylogs Constraints for data quality validation WhyLabs Conclusion Points to remember Multiple choice questions Answers Questions Chapter 15: Post-Productionizing ML Models Introduction Structure Objectives Bridging the gap between the ML model and the creation of business value Model security Adversarial attack Data poisoning attack Distributed Denial of Service attack (DDoS) Data privacy attack Mitigate the risk of model attacks A/B testing MLOps is the future Conclusion Points to remember Multiple choice questions Answers Questions Index back title

Similar books

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

2010 · PDF

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

1858 · PDF

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

2022 · PDF

The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians

The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians

1809 · PDF