SlideShare ist ein Scribd-Unternehmen logo
1 von 37
Bodywork – GitOps for Machine Learning
Continuous deployment for data science
and machine learning teams
Alex Ioannides, March 2021
1.Continuous deployment in machine learning
2.Why machine learning projects are hard to deploy
3.What’s Bodywork and how does it help?
4.Arriving at GitOps
5.Case studies and demos
AGENDA
• Co-founder of Bodywork Machine Learning, the creators of Bodywork.
• ML engineer for Oracle AI Apps division, focusing on MLOps.
• Built the ML functions for Perfect Channel and LiveMore Capital.
• 8 years in financial services – Credit Suisse, Standard Bank, Moodys.
• PhD in computational neuroscience from UCL.
• Recovering theoretical physicist (going back a long time now…).
ABOUT ME
I am not a software engineer, and this is not going to be a lecture on
DevOps best-practices for data scientists and ML engineers.
I have, however, worked with some brilliant developers and learnt a lot
from them in the process. This talk will be centered from a ML
engineer’s frame-of-reference – i.e., what are useful best practices for
ML and why.
ABOUT ME
CI / CD
CONTINUOUS DEPLOYMENT IN ML
CONTINUOUS DEPLOYMENT IN ML
Continuous Integration
CONTINUOUS DEPLOYMENT IN ML
Aside - Writing tests for ML Systems
Example Unit Tests for ML:
• Feature transformation pipelines yield expected results.
• Training routines yield ‘valid’ models for ‘valid’ data.
• Unseen categories and/or outliers are handled gracefully.
Example Integration Tests for ML:
• You can read-from and write-to object storge or your model registry,
feature store, etc.
• Requests to scoring services with REST APIs yield expected responses.
➡️ “Effective Testing for Machine Learning Systems” by Jeremy Jordan
CONTINUOUS DEPLOYMENT IN ML
Continuous Deployment
?
CONTINUOUS DEPLOYMENT IN ML
Continuous Deployment – push models to cloud object storage
CONTINUOUS DEPLOYMENT IN ML
Continuous Deployment – push models to a registry
CONTINUOUS DEPLOYMENT IN ML
Continuous Deployment – push container images to a cloud platform
CONTINUOUS DEPLOYMENT IN ML
Continuous Deployment – push container images to a Kubernetes cluster
CONTINUOUS DEPLOYMENT IN ML
Aside – Docker and Kubernetes are ideal for building ML Systems
Docker:
• Reproducible environments.
• Compose ML pipelines using containers as building-blocks.
Kubernetes:
• Provides all the resources you could want for building a MLOps
platform – e.g., jobs, services and easy networking.
• Resilience and horizontal-scaling are built-in from the bottom-up.
➡️ “Deploying Python ML Models with Flask, Docker and Kubernetes" by Me
Example – serve a pre-trained model via a microservice with a REST API
WHY ML PROJECTS ARE HARD TO DEPLOY
WHY ML PROJECTS ARE HARD TO DEPLOY
Example – serve a pre-trained model via a microservice with a REST API
• Multiple points of failure.
• Requires a more-than-basic understanding of Docker and Linux.
• Needs experience with container orchestration (e.g., Kubernetes).
• Doesn’t scale easily.
• Maintaining Docker images is an extra responsibility for ML engineers.
• This is not Machine Learning - this is DevOps.
WHAT’S BODYWORK AND HOW DOES IT HELP?
WHAT’S BODYWORK AND HOW DOES IT HELP?
Continuous Deployment – from GitHub to Kubernetes with Bodywork
WHAT’S BODYWORK AND HOW DOES IT HELP?
Tackle deployment problems head-on and separately from project codebase:
• Create a generic Linux container with Python and Git installed.
• Use Git to pull project code into the cluster environment and then
dynamically install requirements - removes the need to build, push and
manage container images on a project-by-project basis.
• Each stage runs a Python executable defining a task – either as a
discrete batch job or the deployment of a long-running service.
• Combine multiple stages into workflows, using a workflow-controller.
Manage complex pipelines and service topologies, with high concurrency.
WHAT’S BODYWORK AND HOW DOES IT HELP?
Use existing code with Bodywork’s project format – no new APIs to learn!
WHAT’S BODYWORK AND HOW DOES IT HELP?
WHAT’S BODYWORK AND HOW DOES IT HELP?
Enables CI/CD for ML projects.
WHAT’S BODYWORK AND HOW DOES IT HELP?
ARRIVING AT GITOPS
➡️ www.gitops.tech
ARRIVING AT GITOPS
“The core idea of GitOps is having a Git repository that always contains
declarative descriptions of the infrastructure currently desired in the
production environment and an automated process to make the production
environment match the described state in the repository.
If you want to deploy a new application or update an existing one, you
only need to update the repository - the automated process handles
everything else. It’s like having cruise control for managing your
applications in production.”
(1) Serving a model via a microservice with a REST API
CASE STUDIES AND DEMOS
➡️ https://github.com/bodywork-ml/bodywork-serve-model-project
CASE STUDIES AND DEMOS
(1) Serving a model via a microservice with a REST API
CASE STUDIES AND DEMOS
➡️ https://github.com/bodywork-ml/bodywork-serve-model-project
(1) Serving a model via a microservice with a REST API
CASE STUDIES AND DEMOS
➡️ https://github.com/bodywork-ml/bodywork-serve-model-project
(2) Train-and-serve ML pipeline
CASE STUDIES AND DEMOS
➡️ https://github.com/bodywork-ml/bodywork-ml-pipeline-project
(2) Train-and-serve ML pipeline
CASE STUDIES AND DEMOS
➡️ https://github.com/bodywork-ml/bodywork-ml-pipeline-project
CASE STUDIES AND DEMOS
(2) Train-and-serve ML pipeline
CASE STUDIES AND DEMOS
➡️ https://github.com/bodywork-ml/bodywork-ml-pipeline-project
(3) Jupyter pipelines
CASE STUDIES AND DEMOS
➡️ https://github.com/bodywork-ml/bodywork-jupyter-pipeline-project
(4) ML Dashboards with Plotly
CASE STUDIES AND DEMOS
➡️ https://github.com/bodywork-ml/bodywork-ml-dashboard-project
(4) ML Dashboards with Plotly
CASE STUDIES AND DEMOS
➡️ https://github.com/bodywork-ml/bodywork-ml-dashboard-project
GET IN TOUCH
github.com/bodywork-ml
bodywork.readthedocs.io/en/latest/
www.bodyworkml.com
@BodyworkML
Bodywork - GitOps for Machine Learning

Weitere ähnliche Inhalte

Was ist angesagt?

Hao Wang - Resume
Hao Wang - ResumeHao Wang - Resume
Hao Wang - Resume
Hao Wang
 

Was ist angesagt? (20)

“Houston, we have a model...” Introduction to MLOps
“Houston, we have a model...” Introduction to MLOps“Houston, we have a model...” Introduction to MLOps
“Houston, we have a model...” Introduction to MLOps
 
How to deploy machine learning models in the Cloud
How to deploy machine learning models in the CloudHow to deploy machine learning models in the Cloud
How to deploy machine learning models in the Cloud
 
Alexandra johnson reducing operational barriers to model training
Alexandra johnson   reducing operational barriers to model trainingAlexandra johnson   reducing operational barriers to model training
Alexandra johnson reducing operational barriers to model training
 
Boost your API with GraphQL
Boost your API with GraphQLBoost your API with GraphQL
Boost your API with GraphQL
 
Update Strategies for the Edge, by Kat Cosgrove
Update Strategies for the Edge, by Kat CosgroveUpdate Strategies for the Edge, by Kat Cosgrove
Update Strategies for the Edge, by Kat Cosgrove
 
AI day2021 approcci DevOps per il rilascio continuo di modelli di machine lea...
AI day2021 approcci DevOps per il rilascio continuo di modelli di machine lea...AI day2021 approcci DevOps per il rilascio continuo di modelli di machine lea...
AI day2021 approcci DevOps per il rilascio continuo di modelli di machine lea...
 
GraphQL Introduction
GraphQL IntroductionGraphQL Introduction
GraphQL Introduction
 
Boost your APIs with GraphQL
Boost your APIs with GraphQLBoost your APIs with GraphQL
Boost your APIs with GraphQL
 
Serverless Machine Learning Workshop
Serverless Machine Learning WorkshopServerless Machine Learning Workshop
Serverless Machine Learning Workshop
 
Hao Wang - Resume
Hao Wang - ResumeHao Wang - Resume
Hao Wang - Resume
 
Papyrus for real-time embedded
Papyrus for real-time embeddedPapyrus for real-time embedded
Papyrus for real-time embedded
 
Api360 Summit The Automated Monolith
Api360 Summit  The Automated MonolithApi360 Summit  The Automated Monolith
Api360 Summit The Automated Monolith
 
Papyrus-RT - Out of its Shell
Papyrus-RT - Out of its ShellPapyrus-RT - Out of its Shell
Papyrus-RT - Out of its Shell
 
EclipseCon 2014 - Modeling symposium lightning talk - Papyrus-RT
EclipseCon 2014 - Modeling symposium lightning talk - Papyrus-RTEclipseCon 2014 - Modeling symposium lightning talk - Papyrus-RT
EclipseCon 2014 - Modeling symposium lightning talk - Papyrus-RT
 
James Baxley - Statically typing your GraphQL app
James Baxley - Statically typing your GraphQL appJames Baxley - Statically typing your GraphQL app
James Baxley - Statically typing your GraphQL app
 
Hydrosphere.io Platform for AI/ML Operations Automation
Hydrosphere.io Platform for AI/ML Operations AutomationHydrosphere.io Platform for AI/ML Operations Automation
Hydrosphere.io Platform for AI/ML Operations Automation
 
PapyrusRT: Modelling and Code Generation
PapyrusRT: Modelling and Code GenerationPapyrusRT: Modelling and Code Generation
PapyrusRT: Modelling and Code Generation
 
An introduction to papyrus
An introduction to papyrusAn introduction to papyrus
An introduction to papyrus
 
AI and ML 101
AI and ML 101AI and ML 101
AI and ML 101
 
DevOps Fundamentals: A perspective on DevOps Culture
DevOps Fundamentals: A perspective on DevOps Culture DevOps Fundamentals: A perspective on DevOps Culture
DevOps Fundamentals: A perspective on DevOps Culture
 

Ähnlich wie Bodywork - GitOps for Machine Learning

How to Migrate Applications Off a Mainframe
How to Migrate Applications Off a MainframeHow to Migrate Applications Off a Mainframe
How to Migrate Applications Off a Mainframe
VMware Tanzu
 
[DSC Europe 23] Milos Grubjesic Empowering Business with Pepsico s Advanced M...
[DSC Europe 23] Milos Grubjesic Empowering Business with Pepsico s Advanced M...[DSC Europe 23] Milos Grubjesic Empowering Business with Pepsico s Advanced M...
[DSC Europe 23] Milos Grubjesic Empowering Business with Pepsico s Advanced M...
DataScienceConferenc1
 
Infrastructure Agnostic Machine Learning Workload Deployment
Infrastructure Agnostic Machine Learning Workload DeploymentInfrastructure Agnostic Machine Learning Workload Deployment
Infrastructure Agnostic Machine Learning Workload Deployment
Databricks
 

Ähnlich wie Bodywork - GitOps for Machine Learning (20)

Kubeflow: portable and scalable machine learning using Jupyterhub and Kuberne...
Kubeflow: portable and scalable machine learning using Jupyterhub and Kuberne...Kubeflow: portable and scalable machine learning using Jupyterhub and Kuberne...
Kubeflow: portable and scalable machine learning using Jupyterhub and Kuberne...
 
How to Migrate Applications Off a Mainframe
How to Migrate Applications Off a MainframeHow to Migrate Applications Off a Mainframe
How to Migrate Applications Off a Mainframe
 
AI & Machine Learning Pipelines with Knative
AI & Machine Learning Pipelines with KnativeAI & Machine Learning Pipelines with Knative
AI & Machine Learning Pipelines with Knative
 
MLOps with Kubeflow
MLOps with Kubeflow MLOps with Kubeflow
MLOps with Kubeflow
 
Containerized architectures for deep learning
Containerized architectures for deep learningContainerized architectures for deep learning
Containerized architectures for deep learning
 
[DSC Europe 23] Milos Grubjesic Empowering Business with Pepsico s Advanced M...
[DSC Europe 23] Milos Grubjesic Empowering Business with Pepsico s Advanced M...[DSC Europe 23] Milos Grubjesic Empowering Business with Pepsico s Advanced M...
[DSC Europe 23] Milos Grubjesic Empowering Business with Pepsico s Advanced M...
 
Weave GitOps - continuous delivery for any Kubernetes
Weave GitOps - continuous delivery for any KubernetesWeave GitOps - continuous delivery for any Kubernetes
Weave GitOps - continuous delivery for any Kubernetes
 
Deploy your machine learning models to production with Kubernetes
Deploy your machine learning models to production with KubernetesDeploy your machine learning models to production with Kubernetes
Deploy your machine learning models to production with Kubernetes
 
MLOps in action
MLOps in actionMLOps in action
MLOps in action
 
Building a MLOps Platform Around MLflow to Enable Model Productionalization i...
Building a MLOps Platform Around MLflow to Enable Model Productionalization i...Building a MLOps Platform Around MLflow to Enable Model Productionalization i...
Building a MLOps Platform Around MLflow to Enable Model Productionalization i...
 
Infrastructure Agnostic Machine Learning Workload Deployment
Infrastructure Agnostic Machine Learning Workload DeploymentInfrastructure Agnostic Machine Learning Workload Deployment
Infrastructure Agnostic Machine Learning Workload Deployment
 
Migrating to Microservices – It's Easier Than You Think
Migrating to Microservices – It's Easier Than You ThinkMigrating to Microservices – It's Easier Than You Think
Migrating to Microservices – It's Easier Than You Think
 
DevOps demystified
DevOps demystifiedDevOps demystified
DevOps demystified
 
Technology insights: Decision Science Platform
Technology insights: Decision Science PlatformTechnology insights: Decision Science Platform
Technology insights: Decision Science Platform
 
Elyra - a set of AI-centric extensions to JupyterLab Notebooks.
Elyra - a set of AI-centric extensions to JupyterLab Notebooks.Elyra - a set of AI-centric extensions to JupyterLab Notebooks.
Elyra - a set of AI-centric extensions to JupyterLab Notebooks.
 
Scaling AI/ML with Containers and Kubernetes
Scaling AI/ML with Containers and Kubernetes Scaling AI/ML with Containers and Kubernetes
Scaling AI/ML with Containers and Kubernetes
 
Vertex AI: Pipelines for your MLOps workflows
Vertex AI: Pipelines for your MLOps workflowsVertex AI: Pipelines for your MLOps workflows
Vertex AI: Pipelines for your MLOps workflows
 
16370 cics project opening and project update f
16370  cics project opening and project update f16370  cics project opening and project update f
16370 cics project opening and project update f
 
Architecting for Scale
Architecting for ScaleArchitecting for Scale
Architecting for Scale
 
The DevOps paradigm - the evolution of IT professionals and opensource toolkit
The DevOps paradigm - the evolution of IT professionals and opensource toolkitThe DevOps paradigm - the evolution of IT professionals and opensource toolkit
The DevOps paradigm - the evolution of IT professionals and opensource toolkit
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Kürzlich hochgeladen (20)

Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 

Bodywork - GitOps for Machine Learning

  • 1. Bodywork – GitOps for Machine Learning Continuous deployment for data science and machine learning teams Alex Ioannides, March 2021
  • 2. 1.Continuous deployment in machine learning 2.Why machine learning projects are hard to deploy 3.What’s Bodywork and how does it help? 4.Arriving at GitOps 5.Case studies and demos AGENDA
  • 3. • Co-founder of Bodywork Machine Learning, the creators of Bodywork. • ML engineer for Oracle AI Apps division, focusing on MLOps. • Built the ML functions for Perfect Channel and LiveMore Capital. • 8 years in financial services – Credit Suisse, Standard Bank, Moodys. • PhD in computational neuroscience from UCL. • Recovering theoretical physicist (going back a long time now…). ABOUT ME
  • 4. I am not a software engineer, and this is not going to be a lecture on DevOps best-practices for data scientists and ML engineers. I have, however, worked with some brilliant developers and learnt a lot from them in the process. This talk will be centered from a ML engineer’s frame-of-reference – i.e., what are useful best practices for ML and why. ABOUT ME
  • 5. CI / CD CONTINUOUS DEPLOYMENT IN ML
  • 6. CONTINUOUS DEPLOYMENT IN ML Continuous Integration
  • 7. CONTINUOUS DEPLOYMENT IN ML Aside - Writing tests for ML Systems Example Unit Tests for ML: • Feature transformation pipelines yield expected results. • Training routines yield ‘valid’ models for ‘valid’ data. • Unseen categories and/or outliers are handled gracefully. Example Integration Tests for ML: • You can read-from and write-to object storge or your model registry, feature store, etc. • Requests to scoring services with REST APIs yield expected responses. ➡️ “Effective Testing for Machine Learning Systems” by Jeremy Jordan
  • 8. CONTINUOUS DEPLOYMENT IN ML Continuous Deployment ?
  • 9. CONTINUOUS DEPLOYMENT IN ML Continuous Deployment – push models to cloud object storage
  • 10. CONTINUOUS DEPLOYMENT IN ML Continuous Deployment – push models to a registry
  • 11. CONTINUOUS DEPLOYMENT IN ML Continuous Deployment – push container images to a cloud platform
  • 12. CONTINUOUS DEPLOYMENT IN ML Continuous Deployment – push container images to a Kubernetes cluster
  • 13. CONTINUOUS DEPLOYMENT IN ML Aside – Docker and Kubernetes are ideal for building ML Systems Docker: • Reproducible environments. • Compose ML pipelines using containers as building-blocks. Kubernetes: • Provides all the resources you could want for building a MLOps platform – e.g., jobs, services and easy networking. • Resilience and horizontal-scaling are built-in from the bottom-up. ➡️ “Deploying Python ML Models with Flask, Docker and Kubernetes" by Me
  • 14. Example – serve a pre-trained model via a microservice with a REST API WHY ML PROJECTS ARE HARD TO DEPLOY
  • 15. WHY ML PROJECTS ARE HARD TO DEPLOY Example – serve a pre-trained model via a microservice with a REST API • Multiple points of failure. • Requires a more-than-basic understanding of Docker and Linux. • Needs experience with container orchestration (e.g., Kubernetes). • Doesn’t scale easily. • Maintaining Docker images is an extra responsibility for ML engineers. • This is not Machine Learning - this is DevOps.
  • 16. WHAT’S BODYWORK AND HOW DOES IT HELP?
  • 17. WHAT’S BODYWORK AND HOW DOES IT HELP? Continuous Deployment – from GitHub to Kubernetes with Bodywork
  • 18. WHAT’S BODYWORK AND HOW DOES IT HELP? Tackle deployment problems head-on and separately from project codebase: • Create a generic Linux container with Python and Git installed. • Use Git to pull project code into the cluster environment and then dynamically install requirements - removes the need to build, push and manage container images on a project-by-project basis. • Each stage runs a Python executable defining a task – either as a discrete batch job or the deployment of a long-running service. • Combine multiple stages into workflows, using a workflow-controller.
  • 19. Manage complex pipelines and service topologies, with high concurrency. WHAT’S BODYWORK AND HOW DOES IT HELP?
  • 20. Use existing code with Bodywork’s project format – no new APIs to learn! WHAT’S BODYWORK AND HOW DOES IT HELP?
  • 21. WHAT’S BODYWORK AND HOW DOES IT HELP?
  • 22. Enables CI/CD for ML projects. WHAT’S BODYWORK AND HOW DOES IT HELP?
  • 23. ARRIVING AT GITOPS ➡️ www.gitops.tech
  • 24. ARRIVING AT GITOPS “The core idea of GitOps is having a Git repository that always contains declarative descriptions of the infrastructure currently desired in the production environment and an automated process to make the production environment match the described state in the repository. If you want to deploy a new application or update an existing one, you only need to update the repository - the automated process handles everything else. It’s like having cruise control for managing your applications in production.”
  • 25. (1) Serving a model via a microservice with a REST API CASE STUDIES AND DEMOS ➡️ https://github.com/bodywork-ml/bodywork-serve-model-project
  • 27. (1) Serving a model via a microservice with a REST API CASE STUDIES AND DEMOS ➡️ https://github.com/bodywork-ml/bodywork-serve-model-project
  • 28. (1) Serving a model via a microservice with a REST API CASE STUDIES AND DEMOS ➡️ https://github.com/bodywork-ml/bodywork-serve-model-project
  • 29. (2) Train-and-serve ML pipeline CASE STUDIES AND DEMOS ➡️ https://github.com/bodywork-ml/bodywork-ml-pipeline-project
  • 30. (2) Train-and-serve ML pipeline CASE STUDIES AND DEMOS ➡️ https://github.com/bodywork-ml/bodywork-ml-pipeline-project
  • 32. (2) Train-and-serve ML pipeline CASE STUDIES AND DEMOS ➡️ https://github.com/bodywork-ml/bodywork-ml-pipeline-project
  • 33. (3) Jupyter pipelines CASE STUDIES AND DEMOS ➡️ https://github.com/bodywork-ml/bodywork-jupyter-pipeline-project
  • 34. (4) ML Dashboards with Plotly CASE STUDIES AND DEMOS ➡️ https://github.com/bodywork-ml/bodywork-ml-dashboard-project
  • 35. (4) ML Dashboards with Plotly CASE STUDIES AND DEMOS ➡️ https://github.com/bodywork-ml/bodywork-ml-dashboard-project

Hinweis der Redaktion

  1. ”Thank you for inviting me to speak to today.”
  2. “I’m going to talk about deploying ML projects to ‘production environments” We’ll focus on how this process can be automated, so we can deploy continuously. We’ll look at the sorts of problems that are often encountered. Then I’ll introduce Bodywork – an open-source framework for continuously deploying ML projects to Kubernetes. I’ll cover how it works and in particular how it uses a pattern called GitOps.
  3. “A little bit about me before we get started” Currently trying to see how far we can take Bodywork and the ideas within it. Oracle was where I first encountered ML deployment at scale and had to confront the problems that Bodywork solves.
  4. “Before we get started, I was to set expectations about where we’re going to go.”
  5. “So, what do we mean when we talk about continuous deployment?” - Most likely to have heard about ‘CICD pipelines’, in which case Continuous Deployment is the CD in CICD. - Let’s start by looking at CICD and what it means in the context of ML projects.
  6. “Here is CI workflow that I’ve used many times in the past.” Describe what is happening here. Continuous integration is the ability to continuously integrate new code into a project. Closely liked to agile development practices.
  7. “Before we move to CD, It’s worth spending a couple of minutes talking about tests for ML systems.” - Based on my experinces.
  8. “We’ve now arrived at CD. We’ve integrated new code – now what?” - Lets talk about some options…
  9. - e.g. your team just want to publish models for down-stream users to pick-up and use as they wish.
  10. - e.g. same as before, but you want to work with a model registry to provide user with an interface built for ML models.
  11. - e.g. you want to deploy containerised ML applications, with some guarantees on reproducibility, so you also need a container orchestration platform.
  12. - e.g. you want to deploy containerised ML applications, with some guarantees on reproducibility, so you also need a container orchestration platform that is agnostic to cloud provider.
  13. “I love Kuberentes and I want to spend a minute telling you why.” - But, I do not think that DS and MLEs need to learn Kubernetes and this has been one of the driving forces behind the development of Bodywork.
  14. “Let’s drill-down into what a deployment pipeline for a simple ML system could look like.” - Describe the use-case and how I’d get it into production.
  15. “Based on my experiences…” - And this is just for a simple use-case.
  16. “We built Bodywork to tackle these ML deployment problems head-on.” Solves the Docker + Kubernetes knowledge-gap. Removes the brittle build-push-deploy pipeline that can be a burden on DS and MLEs. Let DS and MLEs focus on what they do best - ML!
  17. “Bodywork replaces the CD part of the CICD pipeline and takes full responsibility for deploying your ML system.” - Eliminates all build-and-push responsibilities.
  18. “Bodywork solves ML deployment problems, by using the following patterns.” - Why do we have workflows  so we can build pipelines
  19. “Bodywork can handle complex deployments graphs, so it can grow with your projects.” - We built a lightweight workflow-controller to avoid having to deploy Apache Airfow or Argo Workflows to manage deployment DAGs, so that we could make Bodywork as simple as possible for the vast majority of use-cases. - From batch-scoring to training models in parallel and deploying complex service topologies – e.g. A/B testing of new models (services).
  20. “We wanted to minimise any interference that using Bodywork, would have on users.” Wanted to make existing code re-usable. Did not want people to have to learn any new APIs and engineer their code around them. The only requirements are that your project code has to available on a remote Git repo and that each deployment stage has to be within its own directory, with some lightweight config.
  21. “Here’s what a train-and-serve pipeline looks like, using Bodywork.”
  22. “Now, let’s go back to where we started and think about what CICD looks like with Bodywork in-the-loop.” The CI part is now the last part of the pipeline and everything to do with your ML system is contained within your Git repo. Periodically re-deploys your project, using the latest state of the codebase.
  23. “And so we have now arrived at GitOps.” This was not intentional, but I realised it after I started reading this book. EVERYTHING you need to describe your entire ML system is contained in the Git repo. Two deployment ‘modes’ push or pull and Bodywork supports both (deployment or cronjob)
  24. “We took this one step further to include the ML application itself.”
  25. “Bodywork is distributed as a Python package that exposes a command-line interface for configuring Kubernetes to deploy your projects.”