SlideShare una empresa de Scribd logo
1 de 50
Descargar para leer sin conexión
CONTINUOUS DELIVERY
FOR MACHINE LEARNING
Workshop | 27th November | ThoughtWorks London
2
Structure of Today’s Workshop
- INTRODUCTION TO THE TOPIC
- EXERCISE 1: SETUP
- EXERCISE 2: DEPLOYMENT PIPELINE
- BREAK
- EXERCISE 3: ML PIPELINE
- DEMO: TRACKING EXPERIMENTS & MODEL MONITORING
©ThoughtWorks 2019
3
Facilitators
©ThoughtWorks 2019
Danilo Sato,
Principal Technology
Consultant
Zehra Kavasoglu,
Data Scientist
James Green,
Data Engineer
Jade Forsberg,
Software Developer
7000+ technologists with 43 offices in 14 countries
Partner for technology driven business transformation
©ThoughtWorks 2019
join.thoughtworks.com
#1
in Agile and
Continuous Delivery
100+
books written
©ThoughtWorks 2019
©ThoughtWorks 2019
TECHNIQUES
Continuous delivery
for machine
learning (CD4ML)
models
#9
TRIAL
©ThoughtWorks 2019
9
#9
CONTINUOUS INTELLIGENCE CYCLE
©ThoughtWorks 2019 8
CD4ML isn’t a technology or a
tool; it is a practice and a set of
principles. Quality is built into
software and improvement is
always possible.
But machine learning systems
have unique challenges; unlike
deterministic software, it is
difficult—or impossible—to
understand the behavior of
data-driven intelligent systems.
This poses a huge challenge
when it comes to deploying
machine learning systems in
accordance with CD principles.
9
PRODUCTIONIZING ML IS HARD
Production systems should be:
● Reproducible
● Testable
● Auditable
● Continuously Improving
HOW DO WE APPLY DECADES OF SOFTWARE DELIVERY EXPERIENCE TO
INTELLIGENT SYSTEMS?
©ThoughtWorks 2019
CD4ML isn’t a technology or a
tool; it is a practice and a set of
principles. Quality is built into
software and improvement is
always possible.
But machine learning systems
have unique challenges; unlike
deterministic software, it is
difficult—or impossible—to
understand the behavior of
data-driven intelligent systems.
This poses a huge challenge
when it comes to deploying
machine learning systems in
accordance with CD principles.
10
PRODUCTIONIZING ML IS HARD
Production systems should be:
● Reproducible
● Testable
● Auditable
● Continuously Improving
Machine Learning is:
● Non-deterministic
● Hard to test
● Hard to explain
● Hard to improve
HOW DO WE APPLY DECADES OF SOFTWARE DELIVERY EXPERIENCE TO
INTELLIGENT SYSTEMS?
©ThoughtWorks 2019
MANY SOURCES OF CHANGE
11©ThoughtWorks 2019
ModelData Code
+ +
Schema
Sampling over Time
Volume
Algorithms
More Training
Experiments
Business Needs
Bug Fixes
Configuration
“Continuous Delivery is the ability to get changes of
all types — including new features, configuration
changes, bug fixes and experiments — into
production, or into the hands of users, safely and
quickly in a sustainable way.”
- Jez Humble & Dave Farley
12©ThoughtWorks 2019
©ThoughtWorks 2019
PRINCIPLES OF CONTINUOUS DELIVERY
13
Create a Repeatable, Reliable Process for Releasing
Software
Automate Almost Everything
Build Quality In
Work in Small Batches
Keep Everything in Source Control
Done Means “Released”
Improve Continuously
WHAT DO WE NEED IN OUR STACK?
14
Doing CD with Machine Learning is still a hard problem
MODEL
PERFORMANCE
ASSESSMENT
TRACKING
VERSION
CONTROL AND
ARTIFACT
REPOSITORIES
©ThoughtWorks 2019
MODEL
MONITORING
AND
OBSERVABILITY
DISCOVERABLE
AND
ACCESSIBLE
DATA
CONTINUOUS
DELIVERY
ORCHESTRATION
TO COMBINE
PIPELINES
INFRASTRUCTURE
FOR MULTIPLE
ENVIRONMENTS
AND
EXPERIMENTS
training
data
Model Building
candidate
models
training
code
codemodeldata
PUTTING EVERYTHING TOGETHER
©ThoughtWorks 2019 15
training
data
Model Building
Model Evaluation
and
Experimentation
candidate
models
metrics
training
code
chosen
model
test
data
codemodeldata
PUTTING EVERYTHING TOGETHER
©ThoughtWorks 2019 16
training
data
Model Building
Model Evaluation
and
Experimentation
Productionize
Model
candidate
models
metrics
training
code
chosen
model
productionized
model
test
data
codemodeldata
PUTTING EVERYTHING TOGETHER
©ThoughtWorks 2019 17
training
data
Model Building
Model Evaluation
and
Experimentation
Productionize
Model
Testing
candidate
models
metrics
training
code
chosen
model
productionized
model
test
code
model
test
data
test
data
codemodeldata
PUTTING EVERYTHING TOGETHER
©ThoughtWorks 2019 18
training
data
Model Building Deployment
Model Evaluation
and
Experimentation
Productionize
Model
Testing
candidate
models
metrics
training
code
chosen
model
productionized
model
test
code
model
test
data
test
data
application
code
code and
model in
production
codemodeldata
PUTTING EVERYTHING TOGETHER
©ThoughtWorks 2019 19
training
data
Model Building Deployment
Model Evaluation
and
Experimentation
Productionize
Model
Testing
candidate
models
metrics
Monitoring and
Observability
training
code
chosen
model
productionized
model
test
code
model
test
data
test
data
application
code
code and
model in
production
production
data
codemodeldata
PUTTING EVERYTHING TOGETHER
©ThoughtWorks 2019 20
training
data
Model Building Deployment
Model Evaluation
and
Experimentation
Productionize
Model
Testing
candidate
models
metrics
Monitoring and
Observability
training
code
chosen
model
productionized
model
test
code
model
test
data
test
data
application
code
code and
model in
production
production
data
codemodeldata
PUTTING EVERYTHING TOGETHER
©ThoughtWorks 2019 21
WHAT WE WILL USE IN THIS WORKSHOP
22
There are many options for tools and technologies to implement CD4ML
©ThoughtWorks 2019
THE MACHINE
LEARNING PROBLEM
WE ARE EXPLORING
TODAY
©ThoughtWorks 2019 23
A REAL BUSINESS PROBLEM
RETAIL / SUPPLY CHAIN
Loss of sales, opportunity cost, stock waste, discounting
REQUIRES
Accurate Demand Forecasting
TYPICAL CHALLENGES
→ Predictions Are Inaccurate
→ Development Takes A Long Time
→ Difficult To Adapt To Market Change Pace
24©ThoughtWorks 2019 24
SALES FORECASTING
FOR GROCERY
RETAILER
● 4,000 items
● 50 stores
● 125,000,000 sales transactions
● 4.5 years of data
Make predictions based on data from:
25
TASK:
Predict how many of each
product will be purchased
in each store on a given
date
©ThoughtWorks 2019
THE SIMPLIFIED WEB APPLICATION
As a buyer, I want to be able to choose a product and
predict how many units the product will sell at a future date.
26©ThoughtWorks 2019
EXERCISE 1: SETUP
https://github.com/ThoughtWorksInc/continuous-intelligence-workshop
27
● Click on instructions → 1-setup.md
● Follow the steps to setup your local development
environment
● Use your assigned User ID
©ThoughtWorks 2019 27
DEPLOYMENT PIPELINE
Automates the process of building, testing, and deploying applications to production
28
Application code in
version control
repository
Container image
as deployment
artifact
Deploy container
to production
servers
©ThoughtWorks 2019
29©ThoughtWorks 2019
An Open Source Continuous Delivery server to model and visualise complex workflows
Pipeline Group
ANATOMY OF A GOCD PIPELINE
30©ThoughtWorks 2019
EXERCISE 2:
DEPLOYMENT
PIPELINE
https://github.com/ThoughtWorksInc/continuous-intelligence-workshop
31
● Click on instructions → 2-deployment-pipeline.md
● Follow the steps to setup your deployment pipeline
● GoCD URL: https://gocd.cd4ml.net
©ThoughtWorks 2019 31
BUT NOW WHAT?
● How do we retrain the model more often?
● How to deploy the retrained model to production?
● How to make sure we don’t break anything when
deploying?
● How to make sure that our modeling approach or
parameterization is still the best fit for the data?
● How to monitor our model “in the wild”?
Once your model is in production...
32©ThoughtWorks 2019 32
BASIC DATA SCIENCE WORKFLOW
33
Gather data and
extract features
Separate into
training and
validation sets
Train model and
evaluate
performance
©ThoughtWorks 2019
SALES FORECAST MODEL TRAINING PROCESS
34©ThoughtWorks 2019
download_data.py
Data splitter.py
Training Data
Validation Data
decision_tree.py
model.pkl
metrics.json
evaluation.py
CHALLENGE 1: THESE ARE LARGE FILES
35©ThoughtWorks 2019
download_data.py
Data splitter.py
Training Data
Validation Data
decision_tree.py
model.pkl
metrics.json
evaluation.py
CHALLENGE 2: AD-HOC MULTI-STEP PROCESS
36©ThoughtWorks 2019
download_data.py
Data splitter.py
Training Data
Validation Data
decision_tree.py
model.pkl
metrics.json
evaluation.py
● dvc is git porcelain for storing large files using cloud storage
● dvc connects model training steps to create reproducible workflows
SOLUTION: dvc
data science version control
37
master
change-max-depth
try-random-forest
model.pkl
decision_tree.py
model.pkl.dvc
©ThoughtWorks 2019
ANATOMY OF A DVC COMMAND
This runs a command and creates a .dvc file. The dvc file points to the
dependencies. The output files are versioned and stored in the cloud by running
dvc push.
When you use the output files (store47-2016.csv) as dependencies for the next
step, a pipeline is automatically created.
You can re-execute an entire pipeline with one command: dvc repro
38
dvc run -d src/download_data.py
-o data/raw/store47-2016.csv python src/download_data.py
©ThoughtWorks 2019 38
EXERCISE 3: MACHINE LEARNING
PIPELINE
https://github.com/ThoughtWorksInc/continuous-intelligence-workshop
39
● Click on instructions → 3-machine-learning-
pipeline.md
● Follow the steps on your local development environment
and in GoCD to create your Machine Learning pipeline
©ThoughtWorks 2019 39
HOW DO WE TRACK
EXPERIMENTS?
● Which experiments and hypothesis are being explored?
● Which algorithms are being used in each experiment?
● Which version of the code was used?
● How long does it take to run each experiment?
● What parameter and hyperparameters were used?
● How fast are my models learning?
● How do we compare results from different runs?
We need to track the scientific process and evaluate our models:
40©ThoughtWorks 2019 40
41©ThoughtWorks 2019
An Open Source platform for managing end-to-end machine learning lifecycle
DEMO: TRACKING EXPERIMENTS
42
● MLflow URL: https://mlflow.cd4ml.net
©ThoughtWorks 2019 42
HOW TO LEARN CONTINUOUSLY?
● Track model usage
● Track model inputs to find training-serving skew
● Track model outputs
● Track model interpretability outputs to identify potential
bias or overfit
● Track model fairness to understand how it behaves
against dimensions that could introduce unfair bias
We need to capture production data to improve our models:
43©ThoughtWorks 2019 43
EFK STACK
Monitoring and Observability infrastructure
44
Open Source data
collector for unified
logging
Open Source Search
Engine
Open Source web UI
to explore and
visualise data
©ThoughtWorks 2019
45©ThoughtWorks 2019
An Open Source UI that makes it easy to explore and visualise the data index in Elasticsearch
DEMO: MODEL MONITORING
46
● Kibana URL: https://kibana.cd4ml.net
©ThoughtWorks 2019 46
SUMMARY - WHAT
HAVE WE LEARNED?
©ThoughtWorks 2019 47
CD4ML
● Proper data/model versioning tools enable reproducible work to be done in
parallel.
● No need to maintain complex data processing/model training scripts.
● We can then put data science work into a Continuous Delivery workflow.
● Result: Continuous, on-demand AI development and deployment,
from research to production, in an automated fashion.
● Benefit: production AI systems that are always as smart as your data
science team.
48©ThoughtWorks 2019
QUESTIONS
©ThoughtWorks 2019 49
THANK YOU
Danilo Sato dsato@thoughtworks.com
James Green jagreen@thoughtworks.com
Jade Forsberg jade.forsberg@thoughtworks.com
Zehra Kavasoglu zehra@thoughtworks.com

Más contenido relacionado

La actualidad más candente

Designers, Developers & Dogs
Designers, Developers & DogsDesigners, Developers & Dogs
Designers, Developers & DogsThoughtworks
 
Design System as a Product
Design System as a ProductDesign System as a Product
Design System as a ProductThoughtworks
 
Technology Radar Webinar UK - Vol. 22
Technology Radar Webinar UK - Vol. 22Technology Radar Webinar UK - Vol. 22
Technology Radar Webinar UK - Vol. 22Thoughtworks
 
From project to product mindset and onwards to product platform architectures
From project to product mindset and onwards to product platform architecturesFrom project to product mindset and onwards to product platform architectures
From project to product mindset and onwards to product platform architecturesJorn Bettin
 
The Agile Business Manifesto
The Agile Business ManifestoThe Agile Business Manifesto
The Agile Business ManifestoNeil Perkin
 
The Disciplines of Continuous innovation
The Disciplines of Continuous innovationThe Disciplines of Continuous innovation
The Disciplines of Continuous innovationBrad Power
 
Tales From a Balanced Team
Tales From a Balanced TeamTales From a Balanced Team
Tales From a Balanced TeamVMware Tanzu
 
Overview of the Implementing Innovation Course
Overview of the Implementing Innovation CourseOverview of the Implementing Innovation Course
Overview of the Implementing Innovation CourseBrad Power
 
Building a resilient business model @ HITEC Webinar
Building a resilient business model  @ HITEC WebinarBuilding a resilient business model  @ HITEC Webinar
Building a resilient business model @ HITEC WebinarMarcelo De Santis
 
recommendation = optimization(prediction)
recommendation = optimization(prediction)recommendation = optimization(prediction)
recommendation = optimization(prediction)Wit Jakuczun
 
Always Be Deploying. How to make R great for machine learning in (not only) E...
Always Be Deploying. How to make R great for machine learning in (not only) E...Always Be Deploying. How to make R great for machine learning in (not only) E...
Always Be Deploying. How to make R great for machine learning in (not only) E...Wit Jakuczun
 
Evidence Based Management - Measuring value to enable improvement and agility
Evidence Based Management - Measuring value to enable improvement and agilityEvidence Based Management - Measuring value to enable improvement and agility
Evidence Based Management - Measuring value to enable improvement and agilityScrum Australia Pty Ltd
 
How Business Model Innovation intertwines with Design Thinking and Agile Deve...
How Business Model Innovation intertwines with Design Thinking and Agile Deve...How Business Model Innovation intertwines with Design Thinking and Agile Deve...
How Business Model Innovation intertwines with Design Thinking and Agile Deve...Tobias Schimmer
 
Framing Patterns
Framing PatternsFraming Patterns
Framing PatternsSmartOrg
 
Hardware is hard(er)
Hardware is hard(er)Hardware is hard(er)
Hardware is hard(er)Thoughtworks
 
Customer and Medical Device Development
Customer and Medical Device DevelopmentCustomer and Medical Device Development
Customer and Medical Device DevelopmentStefan Baggström
 
2015-09-02.Sept ATL Demand Event_ SEND
2015-09-02.Sept ATL Demand Event_ SEND2015-09-02.Sept ATL Demand Event_ SEND
2015-09-02.Sept ATL Demand Event_ SENDRandy Pilkenton
 
Intergen Smarts 7 (2004)
Intergen Smarts 7 (2004)Intergen Smarts 7 (2004)
Intergen Smarts 7 (2004)Intergen
 

La actualidad más candente (20)

Designers, Developers & Dogs
Designers, Developers & DogsDesigners, Developers & Dogs
Designers, Developers & Dogs
 
Design System as a Product
Design System as a ProductDesign System as a Product
Design System as a Product
 
Technology Radar Webinar UK - Vol. 22
Technology Radar Webinar UK - Vol. 22Technology Radar Webinar UK - Vol. 22
Technology Radar Webinar UK - Vol. 22
 
From project to product mindset and onwards to product platform architectures
From project to product mindset and onwards to product platform architecturesFrom project to product mindset and onwards to product platform architectures
From project to product mindset and onwards to product platform architectures
 
The Agile Business Manifesto
The Agile Business ManifestoThe Agile Business Manifesto
The Agile Business Manifesto
 
The Disciplines of Continuous innovation
The Disciplines of Continuous innovationThe Disciplines of Continuous innovation
The Disciplines of Continuous innovation
 
Tales From a Balanced Team
Tales From a Balanced TeamTales From a Balanced Team
Tales From a Balanced Team
 
Overview of the Implementing Innovation Course
Overview of the Implementing Innovation CourseOverview of the Implementing Innovation Course
Overview of the Implementing Innovation Course
 
Building a resilient business model @ HITEC Webinar
Building a resilient business model  @ HITEC WebinarBuilding a resilient business model  @ HITEC Webinar
Building a resilient business model @ HITEC Webinar
 
recommendation = optimization(prediction)
recommendation = optimization(prediction)recommendation = optimization(prediction)
recommendation = optimization(prediction)
 
Always Be Deploying. How to make R great for machine learning in (not only) E...
Always Be Deploying. How to make R great for machine learning in (not only) E...Always Be Deploying. How to make R great for machine learning in (not only) E...
Always Be Deploying. How to make R great for machine learning in (not only) E...
 
Evidence Based Management - Measuring value to enable improvement and agility
Evidence Based Management - Measuring value to enable improvement and agilityEvidence Based Management - Measuring value to enable improvement and agility
Evidence Based Management - Measuring value to enable improvement and agility
 
How Business Model Innovation intertwines with Design Thinking and Agile Deve...
How Business Model Innovation intertwines with Design Thinking and Agile Deve...How Business Model Innovation intertwines with Design Thinking and Agile Deve...
How Business Model Innovation intertwines with Design Thinking and Agile Deve...
 
Framing Patterns
Framing PatternsFraming Patterns
Framing Patterns
 
Innovation in Custom Software Development
Innovation in Custom Software DevelopmentInnovation in Custom Software Development
Innovation in Custom Software Development
 
Project to product mindset
Project to product mindsetProject to product mindset
Project to product mindset
 
Hardware is hard(er)
Hardware is hard(er)Hardware is hard(er)
Hardware is hard(er)
 
Customer and Medical Device Development
Customer and Medical Device DevelopmentCustomer and Medical Device Development
Customer and Medical Device Development
 
2015-09-02.Sept ATL Demand Event_ SEND
2015-09-02.Sept ATL Demand Event_ SEND2015-09-02.Sept ATL Demand Event_ SEND
2015-09-02.Sept ATL Demand Event_ SEND
 
Intergen Smarts 7 (2004)
Intergen Smarts 7 (2004)Intergen Smarts 7 (2004)
Intergen Smarts 7 (2004)
 

Similar a Continuous Delivery for Machine Learning Workshop

CD4ML - ThoughtWorks MeetUp Munich Christoph Windheuser May 8th 2019
CD4ML - ThoughtWorks MeetUp Munich Christoph Windheuser May 8th 2019CD4ML - ThoughtWorks MeetUp Munich Christoph Windheuser May 8th 2019
CD4ML - ThoughtWorks MeetUp Munich Christoph Windheuser May 8th 2019Christoph Windheuser
 
“Data Versioning: Towards Reproducibility in Machine Learning,” a Presentatio...
“Data Versioning: Towards Reproducibility in Machine Learning,” a Presentatio...“Data Versioning: Towards Reproducibility in Machine Learning,” a Presentatio...
“Data Versioning: Towards Reproducibility in Machine Learning,” a Presentatio...Edge AI and Vision Alliance
 
Emerging Best Practises for Machine Learning Engineering (Canberra Meetup edits)
Emerging Best Practises for Machine Learning Engineering (Canberra Meetup edits)Emerging Best Practises for Machine Learning Engineering (Canberra Meetup edits)
Emerging Best Practises for Machine Learning Engineering (Canberra Meetup edits)Lex Toumbourou
 
Continuous Intelligence: Keeping Your AI Application in Production (NDC Sydne...
Continuous Intelligence: Keeping Your AI Application in Production (NDC Sydne...Continuous Intelligence: Keeping Your AI Application in Production (NDC Sydne...
Continuous Intelligence: Keeping Your AI Application in Production (NDC Sydne...Dr. Arif Wider
 
Continuous Intelligence: Moving Machine Learning into Production Reliably
Continuous Intelligence: Moving Machine Learning into Production ReliablyContinuous Intelligence: Moving Machine Learning into Production Reliably
Continuous Intelligence: Moving Machine Learning into Production ReliablyDr. Arif Wider
 
Real-time Manufacturing Management for a Hybrid Process
Real-time Manufacturing Management for a Hybrid ProcessReal-time Manufacturing Management for a Hybrid Process
Real-time Manufacturing Management for a Hybrid Processmichaelthonea
 
MACHINE LEARNING AUTOMATIONS PIPELINE WITH CI/CD
MACHINE LEARNING AUTOMATIONS PIPELINE WITH CI/CDMACHINE LEARNING AUTOMATIONS PIPELINE WITH CI/CD
MACHINE LEARNING AUTOMATIONS PIPELINE WITH CI/CDIRJET Journal
 
Emerging Best Practises for Machine Learning Engineering- Lex Toumbourou (By ...
Emerging Best Practises for Machine Learning Engineering- Lex Toumbourou (By ...Emerging Best Practises for Machine Learning Engineering- Lex Toumbourou (By ...
Emerging Best Practises for Machine Learning Engineering- Lex Toumbourou (By ...Thoughtworks
 
Continuous Delivery
Continuous DeliveryContinuous Delivery
Continuous DeliveryNetcetera
 
Continuous Deployment To The Cloud
Continuous Deployment To The CloudContinuous Deployment To The Cloud
Continuous Deployment To The CloudMarcin Grzejszczak
 
Decoding Puppet & Jenkins via DevOps
Decoding Puppet & Jenkins via DevOpsDecoding Puppet & Jenkins via DevOps
Decoding Puppet & Jenkins via DevOpsSkillspeed
 
What is the best approach to tdd
What is the best approach to tddWhat is the best approach to tdd
What is the best approach to tddLuca Mattia Ferrari
 
Full stack development best practice and toolset
Full stack development best practice and toolsetFull stack development best practice and toolset
Full stack development best practice and toolsetReid Lai
 
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...Marcin Grzejszczak
 
Production-Ready Kubernetes: It's Not About Technology
Production-Ready Kubernetes: It's Not About TechnologyProduction-Ready Kubernetes: It's Not About Technology
Production-Ready Kubernetes: It's Not About TechnologyAntoine Craske
 
PureApplication: Devops and Urbancode
PureApplication: Devops and UrbancodePureApplication: Devops and Urbancode
PureApplication: Devops and UrbancodeJohn Hawkins
 
Why we should consider Open Hybrid Cloud.pdf
Why we should  consider Open Hybrid Cloud.pdfWhy we should  consider Open Hybrid Cloud.pdf
Why we should consider Open Hybrid Cloud.pdfMasahiko Umeno
 
IBM Bluemix OpenWhisk: Interconnect 2016, Las Vegas: CCD-1088: The Future of ...
IBM Bluemix OpenWhisk: Interconnect 2016, Las Vegas: CCD-1088: The Future of ...IBM Bluemix OpenWhisk: Interconnect 2016, Las Vegas: CCD-1088: The Future of ...
IBM Bluemix OpenWhisk: Interconnect 2016, Las Vegas: CCD-1088: The Future of ...OpenWhisk
 
Cloud load testing with Visual Studio Team Services
Cloud load testing with Visual Studio Team ServicesCloud load testing with Visual Studio Team Services
Cloud load testing with Visual Studio Team ServicesMartin Hinshelwood
 

Similar a Continuous Delivery for Machine Learning Workshop (20)

CD4ML - ThoughtWorks MeetUp Munich Christoph Windheuser May 8th 2019
CD4ML - ThoughtWorks MeetUp Munich Christoph Windheuser May 8th 2019CD4ML - ThoughtWorks MeetUp Munich Christoph Windheuser May 8th 2019
CD4ML - ThoughtWorks MeetUp Munich Christoph Windheuser May 8th 2019
 
“Data Versioning: Towards Reproducibility in Machine Learning,” a Presentatio...
“Data Versioning: Towards Reproducibility in Machine Learning,” a Presentatio...“Data Versioning: Towards Reproducibility in Machine Learning,” a Presentatio...
“Data Versioning: Towards Reproducibility in Machine Learning,” a Presentatio...
 
Emerging Best Practises for Machine Learning Engineering (Canberra Meetup edits)
Emerging Best Practises for Machine Learning Engineering (Canberra Meetup edits)Emerging Best Practises for Machine Learning Engineering (Canberra Meetup edits)
Emerging Best Practises for Machine Learning Engineering (Canberra Meetup edits)
 
Continuous Intelligence: Keeping Your AI Application in Production (NDC Sydne...
Continuous Intelligence: Keeping Your AI Application in Production (NDC Sydne...Continuous Intelligence: Keeping Your AI Application in Production (NDC Sydne...
Continuous Intelligence: Keeping Your AI Application in Production (NDC Sydne...
 
Continuous Intelligence: Moving Machine Learning into Production Reliably
Continuous Intelligence: Moving Machine Learning into Production ReliablyContinuous Intelligence: Moving Machine Learning into Production Reliably
Continuous Intelligence: Moving Machine Learning into Production Reliably
 
Real-time Manufacturing Management for a Hybrid Process
Real-time Manufacturing Management for a Hybrid ProcessReal-time Manufacturing Management for a Hybrid Process
Real-time Manufacturing Management for a Hybrid Process
 
MACHINE LEARNING AUTOMATIONS PIPELINE WITH CI/CD
MACHINE LEARNING AUTOMATIONS PIPELINE WITH CI/CDMACHINE LEARNING AUTOMATIONS PIPELINE WITH CI/CD
MACHINE LEARNING AUTOMATIONS PIPELINE WITH CI/CD
 
Emerging Best Practises for Machine Learning Engineering- Lex Toumbourou (By ...
Emerging Best Practises for Machine Learning Engineering- Lex Toumbourou (By ...Emerging Best Practises for Machine Learning Engineering- Lex Toumbourou (By ...
Emerging Best Practises for Machine Learning Engineering- Lex Toumbourou (By ...
 
Continuous Delivery
Continuous DeliveryContinuous Delivery
Continuous Delivery
 
Continuous Deployment To The Cloud
Continuous Deployment To The CloudContinuous Deployment To The Cloud
Continuous Deployment To The Cloud
 
Decoding Puppet & Jenkins via DevOps
Decoding Puppet & Jenkins via DevOpsDecoding Puppet & Jenkins via DevOps
Decoding Puppet & Jenkins via DevOps
 
What is the best approach to tdd
What is the best approach to tddWhat is the best approach to tdd
What is the best approach to tdd
 
Full stack development best practice and toolset
Full stack development best practice and toolsetFull stack development best practice and toolset
Full stack development best practice and toolset
 
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
 
Production-Ready Kubernetes: It's Not About Technology
Production-Ready Kubernetes: It's Not About TechnologyProduction-Ready Kubernetes: It's Not About Technology
Production-Ready Kubernetes: It's Not About Technology
 
PureApplication: Devops and Urbancode
PureApplication: Devops and UrbancodePureApplication: Devops and Urbancode
PureApplication: Devops and Urbancode
 
Why we should consider Open Hybrid Cloud.pdf
Why we should  consider Open Hybrid Cloud.pdfWhy we should  consider Open Hybrid Cloud.pdf
Why we should consider Open Hybrid Cloud.pdf
 
IBM Bluemix OpenWhisk: Interconnect 2016, Las Vegas: CCD-1088: The Future of ...
IBM Bluemix OpenWhisk: Interconnect 2016, Las Vegas: CCD-1088: The Future of ...IBM Bluemix OpenWhisk: Interconnect 2016, Las Vegas: CCD-1088: The Future of ...
IBM Bluemix OpenWhisk: Interconnect 2016, Las Vegas: CCD-1088: The Future of ...
 
IBM Bluemix Openwhisk
IBM Bluemix OpenwhiskIBM Bluemix Openwhisk
IBM Bluemix Openwhisk
 
Cloud load testing with Visual Studio Team Services
Cloud load testing with Visual Studio Team ServicesCloud load testing with Visual Studio Team Services
Cloud load testing with Visual Studio Team Services
 

Más de Thoughtworks

More impact with flexible teams
More impact with flexible teamsMore impact with flexible teams
More impact with flexible teamsThoughtworks
 
Culture of Innovation
Culture of InnovationCulture of Innovation
Culture of InnovationThoughtworks
 
Developer Experience
Developer ExperienceDeveloper Experience
Developer ExperienceThoughtworks
 
Amazon's Culture of Innovation
Amazon's Culture of InnovationAmazon's Culture of Innovation
Amazon's Culture of InnovationThoughtworks
 
Your test coverage is a lie!
Your test coverage is a lie!Your test coverage is a lie!
Your test coverage is a lie!Thoughtworks
 
Docker container security
Docker container securityDocker container security
Docker container securityThoughtworks
 
A Tribute to Turing
A Tribute to TuringA Tribute to Turing
A Tribute to TuringThoughtworks
 
Rsa maths worked out
Rsa maths worked outRsa maths worked out
Rsa maths worked outThoughtworks
 
Do No Harm: Do Technologists Need a Code of Ethics?
Do No Harm: Do Technologists Need a Code of Ethics?Do No Harm: Do Technologists Need a Code of Ethics?
Do No Harm: Do Technologists Need a Code of Ethics?Thoughtworks
 
Making best-in-class security ubiquitous - Why security is no longer just an ...
Making best-in-class security ubiquitous - Why security is no longer just an ...Making best-in-class security ubiquitous - Why security is no longer just an ...
Making best-in-class security ubiquitous - Why security is no longer just an ...Thoughtworks
 
Security by default - Building continuous cyber-resilience.
Security by default - Building continuous cyber-resilience.Security by default - Building continuous cyber-resilience.
Security by default - Building continuous cyber-resilience.Thoughtworks
 
How to tell secrets
How to tell secretsHow to tell secrets
How to tell secretsThoughtworks
 
Alice has a Blue Car: Beginning the Conversation Around Ethically Aware Decis...
Alice has a Blue Car: Beginning the Conversation Around Ethically Aware Decis...Alice has a Blue Car: Beginning the Conversation Around Ethically Aware Decis...
Alice has a Blue Car: Beginning the Conversation Around Ethically Aware Decis...Thoughtworks
 
Holistic approach to cloud adoption
Holistic approach to cloud adoptionHolistic approach to cloud adoption
Holistic approach to cloud adoptionThoughtworks
 
Ada Lovelace Day 2019 - Sydney
Ada Lovelace Day 2019 - SydneyAda Lovelace Day 2019 - Sydney
Ada Lovelace Day 2019 - SydneyThoughtworks
 
Ada Lovelace Day 2019 - Brisbane
Ada Lovelace Day 2019 - BrisbaneAda Lovelace Day 2019 - Brisbane
Ada Lovelace Day 2019 - BrisbaneThoughtworks
 

Más de Thoughtworks (18)

More impact with flexible teams
More impact with flexible teamsMore impact with flexible teams
More impact with flexible teams
 
Culture of Innovation
Culture of InnovationCulture of Innovation
Culture of Innovation
 
Dual-Track Agile
Dual-Track AgileDual-Track Agile
Dual-Track Agile
 
Developer Experience
Developer ExperienceDeveloper Experience
Developer Experience
 
Amazon's Culture of Innovation
Amazon's Culture of InnovationAmazon's Culture of Innovation
Amazon's Culture of Innovation
 
Error handling
Error handlingError handling
Error handling
 
Your test coverage is a lie!
Your test coverage is a lie!Your test coverage is a lie!
Your test coverage is a lie!
 
Docker container security
Docker container securityDocker container security
Docker container security
 
A Tribute to Turing
A Tribute to TuringA Tribute to Turing
A Tribute to Turing
 
Rsa maths worked out
Rsa maths worked outRsa maths worked out
Rsa maths worked out
 
Do No Harm: Do Technologists Need a Code of Ethics?
Do No Harm: Do Technologists Need a Code of Ethics?Do No Harm: Do Technologists Need a Code of Ethics?
Do No Harm: Do Technologists Need a Code of Ethics?
 
Making best-in-class security ubiquitous - Why security is no longer just an ...
Making best-in-class security ubiquitous - Why security is no longer just an ...Making best-in-class security ubiquitous - Why security is no longer just an ...
Making best-in-class security ubiquitous - Why security is no longer just an ...
 
Security by default - Building continuous cyber-resilience.
Security by default - Building continuous cyber-resilience.Security by default - Building continuous cyber-resilience.
Security by default - Building continuous cyber-resilience.
 
How to tell secrets
How to tell secretsHow to tell secrets
How to tell secrets
 
Alice has a Blue Car: Beginning the Conversation Around Ethically Aware Decis...
Alice has a Blue Car: Beginning the Conversation Around Ethically Aware Decis...Alice has a Blue Car: Beginning the Conversation Around Ethically Aware Decis...
Alice has a Blue Car: Beginning the Conversation Around Ethically Aware Decis...
 
Holistic approach to cloud adoption
Holistic approach to cloud adoptionHolistic approach to cloud adoption
Holistic approach to cloud adoption
 
Ada Lovelace Day 2019 - Sydney
Ada Lovelace Day 2019 - SydneyAda Lovelace Day 2019 - Sydney
Ada Lovelace Day 2019 - Sydney
 
Ada Lovelace Day 2019 - Brisbane
Ada Lovelace Day 2019 - BrisbaneAda Lovelace Day 2019 - Brisbane
Ada Lovelace Day 2019 - Brisbane
 

Último

The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 

Continuous Delivery for Machine Learning Workshop

  • 1. CONTINUOUS DELIVERY FOR MACHINE LEARNING Workshop | 27th November | ThoughtWorks London
  • 2. 2 Structure of Today’s Workshop - INTRODUCTION TO THE TOPIC - EXERCISE 1: SETUP - EXERCISE 2: DEPLOYMENT PIPELINE - BREAK - EXERCISE 3: ML PIPELINE - DEMO: TRACKING EXPERIMENTS & MODEL MONITORING ©ThoughtWorks 2019
  • 3. 3 Facilitators ©ThoughtWorks 2019 Danilo Sato, Principal Technology Consultant Zehra Kavasoglu, Data Scientist James Green, Data Engineer Jade Forsberg, Software Developer
  • 4. 7000+ technologists with 43 offices in 14 countries Partner for technology driven business transformation ©ThoughtWorks 2019 join.thoughtworks.com
  • 5. #1 in Agile and Continuous Delivery 100+ books written ©ThoughtWorks 2019
  • 7. TECHNIQUES Continuous delivery for machine learning (CD4ML) models #9 TRIAL ©ThoughtWorks 2019 9 #9
  • 9. CD4ML isn’t a technology or a tool; it is a practice and a set of principles. Quality is built into software and improvement is always possible. But machine learning systems have unique challenges; unlike deterministic software, it is difficult—or impossible—to understand the behavior of data-driven intelligent systems. This poses a huge challenge when it comes to deploying machine learning systems in accordance with CD principles. 9 PRODUCTIONIZING ML IS HARD Production systems should be: ● Reproducible ● Testable ● Auditable ● Continuously Improving HOW DO WE APPLY DECADES OF SOFTWARE DELIVERY EXPERIENCE TO INTELLIGENT SYSTEMS? ©ThoughtWorks 2019
  • 10. CD4ML isn’t a technology or a tool; it is a practice and a set of principles. Quality is built into software and improvement is always possible. But machine learning systems have unique challenges; unlike deterministic software, it is difficult—or impossible—to understand the behavior of data-driven intelligent systems. This poses a huge challenge when it comes to deploying machine learning systems in accordance with CD principles. 10 PRODUCTIONIZING ML IS HARD Production systems should be: ● Reproducible ● Testable ● Auditable ● Continuously Improving Machine Learning is: ● Non-deterministic ● Hard to test ● Hard to explain ● Hard to improve HOW DO WE APPLY DECADES OF SOFTWARE DELIVERY EXPERIENCE TO INTELLIGENT SYSTEMS? ©ThoughtWorks 2019
  • 11. MANY SOURCES OF CHANGE 11©ThoughtWorks 2019 ModelData Code + + Schema Sampling over Time Volume Algorithms More Training Experiments Business Needs Bug Fixes Configuration
  • 12. “Continuous Delivery is the ability to get changes of all types — including new features, configuration changes, bug fixes and experiments — into production, or into the hands of users, safely and quickly in a sustainable way.” - Jez Humble & Dave Farley 12©ThoughtWorks 2019
  • 13. ©ThoughtWorks 2019 PRINCIPLES OF CONTINUOUS DELIVERY 13 Create a Repeatable, Reliable Process for Releasing Software Automate Almost Everything Build Quality In Work in Small Batches Keep Everything in Source Control Done Means “Released” Improve Continuously
  • 14. WHAT DO WE NEED IN OUR STACK? 14 Doing CD with Machine Learning is still a hard problem MODEL PERFORMANCE ASSESSMENT TRACKING VERSION CONTROL AND ARTIFACT REPOSITORIES ©ThoughtWorks 2019 MODEL MONITORING AND OBSERVABILITY DISCOVERABLE AND ACCESSIBLE DATA CONTINUOUS DELIVERY ORCHESTRATION TO COMBINE PIPELINES INFRASTRUCTURE FOR MULTIPLE ENVIRONMENTS AND EXPERIMENTS
  • 19. training data Model Building Deployment Model Evaluation and Experimentation Productionize Model Testing candidate models metrics training code chosen model productionized model test code model test data test data application code code and model in production codemodeldata PUTTING EVERYTHING TOGETHER ©ThoughtWorks 2019 19
  • 20. training data Model Building Deployment Model Evaluation and Experimentation Productionize Model Testing candidate models metrics Monitoring and Observability training code chosen model productionized model test code model test data test data application code code and model in production production data codemodeldata PUTTING EVERYTHING TOGETHER ©ThoughtWorks 2019 20
  • 21. training data Model Building Deployment Model Evaluation and Experimentation Productionize Model Testing candidate models metrics Monitoring and Observability training code chosen model productionized model test code model test data test data application code code and model in production production data codemodeldata PUTTING EVERYTHING TOGETHER ©ThoughtWorks 2019 21
  • 22. WHAT WE WILL USE IN THIS WORKSHOP 22 There are many options for tools and technologies to implement CD4ML ©ThoughtWorks 2019
  • 23. THE MACHINE LEARNING PROBLEM WE ARE EXPLORING TODAY ©ThoughtWorks 2019 23
  • 24. A REAL BUSINESS PROBLEM RETAIL / SUPPLY CHAIN Loss of sales, opportunity cost, stock waste, discounting REQUIRES Accurate Demand Forecasting TYPICAL CHALLENGES → Predictions Are Inaccurate → Development Takes A Long Time → Difficult To Adapt To Market Change Pace 24©ThoughtWorks 2019 24
  • 25. SALES FORECASTING FOR GROCERY RETAILER ● 4,000 items ● 50 stores ● 125,000,000 sales transactions ● 4.5 years of data Make predictions based on data from: 25 TASK: Predict how many of each product will be purchased in each store on a given date ©ThoughtWorks 2019
  • 26. THE SIMPLIFIED WEB APPLICATION As a buyer, I want to be able to choose a product and predict how many units the product will sell at a future date. 26©ThoughtWorks 2019
  • 27. EXERCISE 1: SETUP https://github.com/ThoughtWorksInc/continuous-intelligence-workshop 27 ● Click on instructions → 1-setup.md ● Follow the steps to setup your local development environment ● Use your assigned User ID ©ThoughtWorks 2019 27
  • 28. DEPLOYMENT PIPELINE Automates the process of building, testing, and deploying applications to production 28 Application code in version control repository Container image as deployment artifact Deploy container to production servers ©ThoughtWorks 2019
  • 29. 29©ThoughtWorks 2019 An Open Source Continuous Delivery server to model and visualise complex workflows
  • 30. Pipeline Group ANATOMY OF A GOCD PIPELINE 30©ThoughtWorks 2019
  • 31. EXERCISE 2: DEPLOYMENT PIPELINE https://github.com/ThoughtWorksInc/continuous-intelligence-workshop 31 ● Click on instructions → 2-deployment-pipeline.md ● Follow the steps to setup your deployment pipeline ● GoCD URL: https://gocd.cd4ml.net ©ThoughtWorks 2019 31
  • 32. BUT NOW WHAT? ● How do we retrain the model more often? ● How to deploy the retrained model to production? ● How to make sure we don’t break anything when deploying? ● How to make sure that our modeling approach or parameterization is still the best fit for the data? ● How to monitor our model “in the wild”? Once your model is in production... 32©ThoughtWorks 2019 32
  • 33. BASIC DATA SCIENCE WORKFLOW 33 Gather data and extract features Separate into training and validation sets Train model and evaluate performance ©ThoughtWorks 2019
  • 34. SALES FORECAST MODEL TRAINING PROCESS 34©ThoughtWorks 2019 download_data.py Data splitter.py Training Data Validation Data decision_tree.py model.pkl metrics.json evaluation.py
  • 35. CHALLENGE 1: THESE ARE LARGE FILES 35©ThoughtWorks 2019 download_data.py Data splitter.py Training Data Validation Data decision_tree.py model.pkl metrics.json evaluation.py
  • 36. CHALLENGE 2: AD-HOC MULTI-STEP PROCESS 36©ThoughtWorks 2019 download_data.py Data splitter.py Training Data Validation Data decision_tree.py model.pkl metrics.json evaluation.py
  • 37. ● dvc is git porcelain for storing large files using cloud storage ● dvc connects model training steps to create reproducible workflows SOLUTION: dvc data science version control 37 master change-max-depth try-random-forest model.pkl decision_tree.py model.pkl.dvc ©ThoughtWorks 2019
  • 38. ANATOMY OF A DVC COMMAND This runs a command and creates a .dvc file. The dvc file points to the dependencies. The output files are versioned and stored in the cloud by running dvc push. When you use the output files (store47-2016.csv) as dependencies for the next step, a pipeline is automatically created. You can re-execute an entire pipeline with one command: dvc repro 38 dvc run -d src/download_data.py -o data/raw/store47-2016.csv python src/download_data.py ©ThoughtWorks 2019 38
  • 39. EXERCISE 3: MACHINE LEARNING PIPELINE https://github.com/ThoughtWorksInc/continuous-intelligence-workshop 39 ● Click on instructions → 3-machine-learning- pipeline.md ● Follow the steps on your local development environment and in GoCD to create your Machine Learning pipeline ©ThoughtWorks 2019 39
  • 40. HOW DO WE TRACK EXPERIMENTS? ● Which experiments and hypothesis are being explored? ● Which algorithms are being used in each experiment? ● Which version of the code was used? ● How long does it take to run each experiment? ● What parameter and hyperparameters were used? ● How fast are my models learning? ● How do we compare results from different runs? We need to track the scientific process and evaluate our models: 40©ThoughtWorks 2019 40
  • 41. 41©ThoughtWorks 2019 An Open Source platform for managing end-to-end machine learning lifecycle
  • 42. DEMO: TRACKING EXPERIMENTS 42 ● MLflow URL: https://mlflow.cd4ml.net ©ThoughtWorks 2019 42
  • 43. HOW TO LEARN CONTINUOUSLY? ● Track model usage ● Track model inputs to find training-serving skew ● Track model outputs ● Track model interpretability outputs to identify potential bias or overfit ● Track model fairness to understand how it behaves against dimensions that could introduce unfair bias We need to capture production data to improve our models: 43©ThoughtWorks 2019 43
  • 44. EFK STACK Monitoring and Observability infrastructure 44 Open Source data collector for unified logging Open Source Search Engine Open Source web UI to explore and visualise data ©ThoughtWorks 2019
  • 45. 45©ThoughtWorks 2019 An Open Source UI that makes it easy to explore and visualise the data index in Elasticsearch
  • 46. DEMO: MODEL MONITORING 46 ● Kibana URL: https://kibana.cd4ml.net ©ThoughtWorks 2019 46
  • 47. SUMMARY - WHAT HAVE WE LEARNED? ©ThoughtWorks 2019 47
  • 48. CD4ML ● Proper data/model versioning tools enable reproducible work to be done in parallel. ● No need to maintain complex data processing/model training scripts. ● We can then put data science work into a Continuous Delivery workflow. ● Result: Continuous, on-demand AI development and deployment, from research to production, in an automated fashion. ● Benefit: production AI systems that are always as smart as your data science team. 48©ThoughtWorks 2019
  • 50. THANK YOU Danilo Sato dsato@thoughtworks.com James Green jagreen@thoughtworks.com Jade Forsberg jade.forsberg@thoughtworks.com Zehra Kavasoglu zehra@thoughtworks.com