SlideShare uma empresa Scribd logo
1 de 38
Continuous Intelligence
Workshop
AI Singapore
2
PRE-WORKSHOP SETUP
Instructions @ workshop scratchpad: https://bit.ly/2Ez5DRt
Please ensure you’ve completed both setup scripts
3
ABOUT US
@thoughtworks
https://www.thoughtworks.com/intelligent-empowerment
©ThoughtWorks 2018 Commercial in Confidence
Our experiences are encapsulated in 80+ books
5
ABOUT US
We are uncovering better ways of developing software
by doing it and helping others do it.
6
TODAY’S PLAN
Why
What
How
7
TODAY’S PLAN
Share principles and practices that can
make it easier for teams to iteratively deploy better ML
products
Share about what to strive towards, and
how to strive towards it
● Questions are welcome (esp. if we start speaking Greek)
● Use the stickies
○ Red: “I need help!”
○ Yellow: “You’re using too much jargon!”
● Parking lot
● Cross-talking
● Punctuality
8
SOME GROUND RULES
9
Time Session
09.00am - 09.30am Debugging setup (if anyone needs help)
09.30am - 10.30am Intro to agile + continuous intelligence
10.45am - 11.00am Learn enough Docker to be dangerous
11.00am - 12.30pm Dojo: Hands on exercise for continuous intelligence
12.30pm - 1.30pm Lunch
1.30pm - 3.00pm User experience
3.15pm - 4.45pm Dojo: You can’t do continuous delivery
without unit tests
5.00pm - 5.30pm General discussion + Q&A
TODAY’S SCHEDULE
LEARNING CHECKLIST
10
❏ Sessions
❏ Environment management with Docker
❏ User experience / product thinking
❏ Continuous integration + Continuous delivery
❏ Test pyramid and unit testing
❏ General discussion
❏ Reuse data processing pipelines to reduce complexity and training-serving
skew
❏ Explainability
❏ Model tracking and monitoring strategies (request shadowing)
❏ Monitor what we care about (metrics, business outcomes, fairness)
❏ Closing the data collection loop
❏ Cross-functional teams
❏ Kaizen health checklists
❏ etc.
Intro to agile +
continuous intelligence
● What do we mean by agile?
● Why should we apply agile to machine learning?
● Pain points in machine learning
● How can agile + continuous delivery practices solve these pain points?
12
SESSION PLAN
What do we really
mean by “agile”?
14
WHAT IS AGILE?
15
[1] Royce, Winston. "Managing the Development of Large Software Systems", Proceedings of IEEE WESCON26 (August): 1–9. 1970.
[2] Bell, Thomas E., and T. A. Thayer. "Software requirements: Are they really a problem?”, Proceedings of the 2nd international conference on
Software engineering. IEEE Computer Society Press, 1976.
AGILE VS. WATERFALL
16
design code test release
A WATERFALL RELEASE
17
design code test release
Deployment
issues
Defects
Product
changes
A WATERFALL RELEASE
Deliver value continuously through working software
Shorten feedback loops
Technical practices
18
AGILE IN 1 MINUTE
… we have come to value:
Individuals and interactions over processes and tools
Working software over comprehensive
documentation
Customer collaboration over contract negotiation
Responding to change over following a plan
That is, while there is value in the items on the right,
we value the items on the left more. 19
AGILE MANIFESTO
Why should we apply agile to
machine learning?
Many of the challenges we face in ML are solved problems
in software engineering
21
23Source: Machine Learning: The High Interest Credit Card of Technical Debt (Google, 2015)
WE GOT 99 PROBLEMS AND MACHINE LEARNING AIN’T ONE
24
THIS IS WHAT MACHINE LEARNING CAN FEEL LIKE
25
We don’t have a machine learning problem.
We have a {UX, business, data, software delivery, ML}
problem
Source: Machine Learning: The High Interest Credit Card of Technical Debt (Google, 2015)
WE GOT 99 PROBLEMS AND MACHINE LEARNING AIN’T ONE
27
DATA MATURITY MODEL
Leveraging machine
learning techniques
to exhibit intelligent
behavior, and take
autonomous actions
from data insights.
Gain insights from
data to inform
decision making,
including descriptive
and diagnostic
analytics.
Ability to design and
build data platforms,
collecting, streaming
and managing
enterprise-wide data,
ready for analysis
MACHINE
INTELLIGENCE
DATA
INSIGHTS
DATA
PLATFORM
ENGINEERING
Uncovering data
opportunities and
guiding the vision for
transformation
organizations to
become data-led
DATA
STRATEGY
SOFTWARE EXCELLENCE AND PRODUCT THINKING
THOUGHTWORKS’ APPROACH TO MACHINE LEARNING / ARTIFICIAL
INTELLIGENCE
29Source: The AI hierarchy of needs
DELIVERING VALUE - A SLICE AT A TIME
PoC
Idea
Make it
simpler
Repeat!
Test in
Lab
Deploy
to prod
Collect,
evaluat
e
Model
iteratio
n
Dark
launch
or A/B
Test in
Lab
Add
value
Uncertain
how to
add value
PoC
Idea
Clear
value add
ML PRODUCT DEVELOPMENT SHOULD BE ITERATIVE, NOT BIG BANG
Pain points in
building machine learning
products
“Works on my machine!”
No data / Data is
everywhere but nowhere
Data stitching (web
scraping, api calls, csv
files)
Not allowed to have
production data on my
laptop
Untitled 17.ipynb
32
Deployment / infra work is
hard
Hard to keep track of
hyperparameters &
metrics
QA is hard
Is my model doing ok?
When should I retrain/re-
release?
Training-serving skew
Interpretability
“I want 100% accuracy”
Harmful models in prod
Users not using our
product
Reproducibility
Dan the data scientist
ML model in
production
How can agile + continuous
delivery practices solve these
problems?
“Works on my machine!”
No data / Data is
everywhere but nowhere
Data stitching (web
scraping, api calls, csv
files)
Not allowed to have
production data on my
laptop
Untitled 17.ipynb
34
Deployment / infra work
is hard
Hard to keep track of
hyperparameters &
metrics
QA is hard
Is my model doing ok?
When should I retrain/re-
release?
Training-serving skew
Interpretability
“I want 100% accuracy”
Harmful models in prod
Users not using our
product
Reproducibility
WHAT PROBLEMS DOES CONTINUOUS DELIVERY SOLVE?
36
CONTINUOUS DELIVERY PIPELINE
Run unit
tests
Deploy
candidate
model to
STAGING
Deploy
model to
PROD
Train and
evaluate
model
push
Source code
repository
trigger
feedback
Model
repositor
y
Data / feature repository
Local env
Model
repositor
y
Source: Continuous Delivery (Jez Humble, Dave Farley)
37
ANATOMY OF A PIPELINE
● Pipeline
○ Commit stage
■ build
■ run unit tests
■ train model
■ evaluate model → artifact
○ Deploy to staging
■ deploy
■ policy layer tests
■ fairness tests
■ adversarial tests
■ etc.
○ Deploy to prod
■ deploy
38
GIT PUSH → [SERIES OF AUTOMATED TESTS] → DEPLOY
39
Any questions so far?
CONTINUOUS DELIVERY CHECKLIST FOR ML PRODUCTS
40
Source control
● All code changes / model parameter changes are checked into source control
● Trunk-based development
● Code reuse
Configuration management
● Automated configuration management across environments (local, qa, prod)
Data processing
● Feature engineering is done through reusable data pipelines
● Data ingestion pipelines are mature, tested, reusable and automatable
● Regularly used features are precompiled into a feature ‘store’
● Collecting more and better training data from production, with every release (garbage in, garbage out problem)
● Create data turking systems for labelling new data (necessary for monitoring and re-training)
● Self-service data access
● Data access control
Training
● Automated infrastructure provisioning and configuration for model training
● Distributed training where necessary
Testing
● Test pyramid (unit tests, functional tests, policy layer tests, exploratory tests)
● Bias testing and fairness testing
● Adversarial testing
● Established baseline for evaluating model performance
41
CONTINUOUS DELIVERY CHECKLIST FOR ML PRODUCTS
Artifact versioning
● All trained models are artifacted and versioned
● Tag artifacts with relevant metadata (e.g. training data, hyperparameters, datetime)
Deployment
● Set up continuous delivery pipeline
● Tracer bullet. Start with simple model+features
● Single-command deployments
● Disaster recovery: (single-command) deployment of last good model in production
● Frequent deployments to production
Policy layer
● Don’t leave critical things to probability (Use rules / heuristics instead)
Monitoring
● Understand model performance in production using canary releases
● Monitor business metrics
● Monitor ML metrics (e.g. RMSE) tests (i) on models, (ii) using latest prod data
● Monitor anything that helps model interpretation (e.g. confusion matrices)
● Alerts and automated retraining of model candidates when/before performance begins to slip
Workflow
● Build cross-functional teams (UX, BA, DS, DE, DEV, etc)
● Iterative development lifecycle
Regular health checks
● How much calendar time to deploy a model from staging to production?
● How much calendar time to add a new feature to the production model?
● How comfortable does your team feel about iteratively deploying models?

Mais conteúdo relacionado

Mais procurados

Digital transformation testing.
Digital transformation testing. Digital transformation testing.
Digital transformation testing. Deepak Daniel
 
Agile and test driven development
Agile and test driven developmentAgile and test driven development
Agile and test driven developmentAhmed El-Deeb
 
Lean Enterprise, A Definitive Approach in Software Development Production
Lean Enterprise, A Definitive Approach in Software Development ProductionLean Enterprise, A Definitive Approach in Software Development Production
Lean Enterprise, A Definitive Approach in Software Development ProductionBerk Dülger
 
DevOps Tactical Adoption Theory - DevOpsDays istanbul 2016
DevOps Tactical Adoption Theory  - DevOpsDays istanbul 2016DevOps Tactical Adoption Theory  - DevOpsDays istanbul 2016
DevOps Tactical Adoption Theory - DevOpsDays istanbul 2016Berk Dülger
 
Agile and Agile methods: what is the most important to understand to succeed
Agile and Agile methods: what is the most important to understand to succeedAgile and Agile methods: what is the most important to understand to succeed
Agile and Agile methods: what is the most important to understand to succeedVaidas Adomauskas
 
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanBehavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanQA or the Highway
 
DevOps Summit 2015 Presentation: Continuous Testing At the Speed of DevOps
DevOps Summit 2015 Presentation: Continuous Testing At the Speed of DevOpsDevOps Summit 2015 Presentation: Continuous Testing At the Speed of DevOps
DevOps Summit 2015 Presentation: Continuous Testing At the Speed of DevOpsSailaja Tennati
 
A New Model for Testing
A New Model for TestingA New Model for Testing
A New Model for TestingSQALab
 
[QE 2018] Paul Gerrard – Automating Assurance: Tools, Collaboration and DevOps
[QE 2018] Paul Gerrard – Automating Assurance: Tools, Collaboration and DevOps[QE 2018] Paul Gerrard – Automating Assurance: Tools, Collaboration and DevOps
[QE 2018] Paul Gerrard – Automating Assurance: Tools, Collaboration and DevOpsFuture Processing
 
High-Performance Agile Testing in Software Development
High-Performance Agile Testing in Software DevelopmentHigh-Performance Agile Testing in Software Development
High-Performance Agile Testing in Software DevelopmentTechWell
 
Building and Scaling High Performing Technology Organizations by Jez Humble a...
Building and Scaling High Performing Technology Organizations by Jez Humble a...Building and Scaling High Performing Technology Organizations by Jez Humble a...
Building and Scaling High Performing Technology Organizations by Jez Humble a...Agile India
 
The Holy Trinity of UI Testing by Diego Molina
The Holy Trinity of UI Testing by Diego MolinaThe Holy Trinity of UI Testing by Diego Molina
The Holy Trinity of UI Testing by Diego MolinaSauce Labs
 
Is Test Planning a lost art in Agile? by Michelle Williams
Is Test Planning a lost art in Agile? by Michelle WilliamsIs Test Planning a lost art in Agile? by Michelle Williams
Is Test Planning a lost art in Agile? by Michelle WilliamsQA or the Highway
 
Test Driven Development (TDD) & Continuous Integration (CI)
Test Driven Development (TDD) & Continuous Integration (CI)Test Driven Development (TDD) & Continuous Integration (CI)
Test Driven Development (TDD) & Continuous Integration (CI)Fatkul Amri
 
How testers add value to the organization appium conf
How testers add value to the organization  appium confHow testers add value to the organization  appium conf
How testers add value to the organization appium confCorina Pip
 

Mais procurados (20)

Digital transformation testing.
Digital transformation testing. Digital transformation testing.
Digital transformation testing.
 
Agile and test driven development
Agile and test driven developmentAgile and test driven development
Agile and test driven development
 
Lean Software Development
Lean Software DevelopmentLean Software Development
Lean Software Development
 
New model
New modelNew model
New model
 
Lean Enterprise, A Definitive Approach in Software Development Production
Lean Enterprise, A Definitive Approach in Software Development ProductionLean Enterprise, A Definitive Approach in Software Development Production
Lean Enterprise, A Definitive Approach in Software Development Production
 
DevOps Tactical Adoption Theory - DevOpsDays istanbul 2016
DevOps Tactical Adoption Theory  - DevOpsDays istanbul 2016DevOps Tactical Adoption Theory  - DevOpsDays istanbul 2016
DevOps Tactical Adoption Theory - DevOpsDays istanbul 2016
 
Agile and Agile methods: what is the most important to understand to succeed
Agile and Agile methods: what is the most important to understand to succeedAgile and Agile methods: what is the most important to understand to succeed
Agile and Agile methods: what is the most important to understand to succeed
 
Why more than half of ML models don't make it to production
Why more than half of ML models don't make it to productionWhy more than half of ML models don't make it to production
Why more than half of ML models don't make it to production
 
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanBehavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
 
DevOps Summit 2015 Presentation: Continuous Testing At the Speed of DevOps
DevOps Summit 2015 Presentation: Continuous Testing At the Speed of DevOpsDevOps Summit 2015 Presentation: Continuous Testing At the Speed of DevOps
DevOps Summit 2015 Presentation: Continuous Testing At the Speed of DevOps
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
A New Model for Testing
A New Model for TestingA New Model for Testing
A New Model for Testing
 
[QE 2018] Paul Gerrard – Automating Assurance: Tools, Collaboration and DevOps
[QE 2018] Paul Gerrard – Automating Assurance: Tools, Collaboration and DevOps[QE 2018] Paul Gerrard – Automating Assurance: Tools, Collaboration and DevOps
[QE 2018] Paul Gerrard – Automating Assurance: Tools, Collaboration and DevOps
 
High-Performance Agile Testing in Software Development
High-Performance Agile Testing in Software DevelopmentHigh-Performance Agile Testing in Software Development
High-Performance Agile Testing in Software Development
 
Building and Scaling High Performing Technology Organizations by Jez Humble a...
Building and Scaling High Performing Technology Organizations by Jez Humble a...Building and Scaling High Performing Technology Organizations by Jez Humble a...
Building and Scaling High Performing Technology Organizations by Jez Humble a...
 
The Holy Trinity of UI Testing by Diego Molina
The Holy Trinity of UI Testing by Diego MolinaThe Holy Trinity of UI Testing by Diego Molina
The Holy Trinity of UI Testing by Diego Molina
 
Is Test Planning a lost art in Agile? by Michelle Williams
Is Test Planning a lost art in Agile? by Michelle WilliamsIs Test Planning a lost art in Agile? by Michelle Williams
Is Test Planning a lost art in Agile? by Michelle Williams
 
Test Driven Development (TDD) & Continuous Integration (CI)
Test Driven Development (TDD) & Continuous Integration (CI)Test Driven Development (TDD) & Continuous Integration (CI)
Test Driven Development (TDD) & Continuous Integration (CI)
 
How testers add value to the organization appium conf
How testers add value to the organization  appium confHow testers add value to the organization  appium conf
How testers add value to the organization appium conf
 
Treinamento TDD
Treinamento TDDTreinamento TDD
Treinamento TDD
 

Semelhante a Continuous Intelligence Workshop

Deploying ML models to production (frequently and safely) - PYCON 2018
Deploying ML models to production (frequently and safely) - PYCON 2018Deploying ML models to production (frequently and safely) - PYCON 2018
Deploying ML models to production (frequently and safely) - PYCON 2018David Tan
 
Rsqrd AI: From R&D to ROI of AI
Rsqrd AI: From R&D to ROI of AIRsqrd AI: From R&D to ROI of AI
Rsqrd AI: From R&D to ROI of AISanjana Chowdhury
 
Deploying ML models to production (frequently and safely) - PYCON 2018
Deploying ML models to production (frequently and safely) - PYCON 2018Deploying ML models to production (frequently and safely) - PYCON 2018
Deploying ML models to production (frequently and safely) - PYCON 2018David Tan
 
Data science tools of the trade
Data science tools of the tradeData science tools of the trade
Data science tools of the tradeFangda Wang
 
Bridging the Gap: from Data Science to Production
Bridging the Gap: from Data Science to ProductionBridging the Gap: from Data Science to Production
Bridging the Gap: from Data Science to ProductionFlorian Wilhelm
 
AgileDC15 I'm Using Chef So I'm DevOps Right?
AgileDC15 I'm Using Chef So I'm DevOps Right?AgileDC15 I'm Using Chef So I'm DevOps Right?
AgileDC15 I'm Using Chef So I'm DevOps Right?Rob Brown
 
Guide to end end machine learning projects
Guide to end end machine learning projectsGuide to end end machine learning projects
Guide to end end machine learning projectsSkyl.ai
 
Managing Data Science Projects
Managing Data Science ProjectsManaging Data Science Projects
Managing Data Science ProjectsDanielle Dean
 
FlorenceAI: Reinventing Data Science at Humana
FlorenceAI: Reinventing Data Science at HumanaFlorenceAI: Reinventing Data Science at Humana
FlorenceAI: Reinventing Data Science at HumanaDatabricks
 
Testing practicies not only in scala
Testing practicies not only in scalaTesting practicies not only in scala
Testing practicies not only in scalaPaweł Panasewicz
 
Deploying ML models in the enterprise
Deploying ML models in the enterpriseDeploying ML models in the enterprise
Deploying ML models in the enterprisedoppenhe
 
TFX: A tensor flow-based production-scale machine learning platform
TFX: A tensor flow-based production-scale machine learning platformTFX: A tensor flow-based production-scale machine learning platform
TFX: A tensor flow-based production-scale machine learning platformShunya Ueta
 
Eric Proegler Early Performance Testing from CAST2014
Eric Proegler Early Performance Testing from CAST2014Eric Proegler Early Performance Testing from CAST2014
Eric Proegler Early Performance Testing from CAST2014Eric Proegler
 
Innovate Better Through Machine data Analytics
Innovate Better Through Machine data AnalyticsInnovate Better Through Machine data Analytics
Innovate Better Through Machine data AnalyticsHal Rottenberg
 
Managers guide to effective building of machine learning products
Managers guide to effective building of machine learning productsManagers guide to effective building of machine learning products
Managers guide to effective building of machine learning productsGianmario Spacagna
 
A brief history of automation in Software Engineering
A brief history of automation in Software EngineeringA brief history of automation in Software Engineering
A brief history of automation in Software EngineeringGeorg Buske
 
Using Data Science to Build an End-to-End Recommendation System
Using Data Science to Build an End-to-End Recommendation SystemUsing Data Science to Build an End-to-End Recommendation System
Using Data Science to Build an End-to-End Recommendation SystemVMware Tanzu
 
Experimentation at Blue Apron (webinar)
Experimentation at Blue Apron (webinar)Experimentation at Blue Apron (webinar)
Experimentation at Blue Apron (webinar)Optimizely
 
May 2021 Spark Testing ... or how to farm reputation on StackOverflow
May 2021 Spark Testing ... or how to farm reputation on StackOverflowMay 2021 Spark Testing ... or how to farm reputation on StackOverflow
May 2021 Spark Testing ... or how to farm reputation on StackOverflowAdam Doyle
 

Semelhante a Continuous Intelligence Workshop (20)

Deploying ML models to production (frequently and safely) - PYCON 2018
Deploying ML models to production (frequently and safely) - PYCON 2018Deploying ML models to production (frequently and safely) - PYCON 2018
Deploying ML models to production (frequently and safely) - PYCON 2018
 
Rsqrd AI: From R&D to ROI of AI
Rsqrd AI: From R&D to ROI of AIRsqrd AI: From R&D to ROI of AI
Rsqrd AI: From R&D to ROI of AI
 
Deploying ML models to production (frequently and safely) - PYCON 2018
Deploying ML models to production (frequently and safely) - PYCON 2018Deploying ML models to production (frequently and safely) - PYCON 2018
Deploying ML models to production (frequently and safely) - PYCON 2018
 
Data science tools of the trade
Data science tools of the tradeData science tools of the trade
Data science tools of the trade
 
Bridging the Gap: from Data Science to Production
Bridging the Gap: from Data Science to ProductionBridging the Gap: from Data Science to Production
Bridging the Gap: from Data Science to Production
 
AgileDC15 I'm Using Chef So I'm DevOps Right?
AgileDC15 I'm Using Chef So I'm DevOps Right?AgileDC15 I'm Using Chef So I'm DevOps Right?
AgileDC15 I'm Using Chef So I'm DevOps Right?
 
Guide to end end machine learning projects
Guide to end end machine learning projectsGuide to end end machine learning projects
Guide to end end machine learning projects
 
Managing Data Science Projects
Managing Data Science ProjectsManaging Data Science Projects
Managing Data Science Projects
 
FlorenceAI: Reinventing Data Science at Humana
FlorenceAI: Reinventing Data Science at HumanaFlorenceAI: Reinventing Data Science at Humana
FlorenceAI: Reinventing Data Science at Humana
 
Testing practicies not only in scala
Testing practicies not only in scalaTesting practicies not only in scala
Testing practicies not only in scala
 
Deploying ML models in the enterprise
Deploying ML models in the enterpriseDeploying ML models in the enterprise
Deploying ML models in the enterprise
 
TFX: A tensor flow-based production-scale machine learning platform
TFX: A tensor flow-based production-scale machine learning platformTFX: A tensor flow-based production-scale machine learning platform
TFX: A tensor flow-based production-scale machine learning platform
 
Eric Proegler Early Performance Testing from CAST2014
Eric Proegler Early Performance Testing from CAST2014Eric Proegler Early Performance Testing from CAST2014
Eric Proegler Early Performance Testing from CAST2014
 
Introduction to Software Engineering
Introduction to Software EngineeringIntroduction to Software Engineering
Introduction to Software Engineering
 
Innovate Better Through Machine data Analytics
Innovate Better Through Machine data AnalyticsInnovate Better Through Machine data Analytics
Innovate Better Through Machine data Analytics
 
Managers guide to effective building of machine learning products
Managers guide to effective building of machine learning productsManagers guide to effective building of machine learning products
Managers guide to effective building of machine learning products
 
A brief history of automation in Software Engineering
A brief history of automation in Software EngineeringA brief history of automation in Software Engineering
A brief history of automation in Software Engineering
 
Using Data Science to Build an End-to-End Recommendation System
Using Data Science to Build an End-to-End Recommendation SystemUsing Data Science to Build an End-to-End Recommendation System
Using Data Science to Build an End-to-End Recommendation System
 
Experimentation at Blue Apron (webinar)
Experimentation at Blue Apron (webinar)Experimentation at Blue Apron (webinar)
Experimentation at Blue Apron (webinar)
 
May 2021 Spark Testing ... or how to farm reputation on StackOverflow
May 2021 Spark Testing ... or how to farm reputation on StackOverflowMay 2021 Spark Testing ... or how to farm reputation on StackOverflow
May 2021 Spark Testing ... or how to farm reputation on StackOverflow
 

Último

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.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
 
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
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
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
 

Último (20)

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.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
 
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
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
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
 

Continuous Intelligence Workshop

  • 2. 2 PRE-WORKSHOP SETUP Instructions @ workshop scratchpad: https://bit.ly/2Ez5DRt Please ensure you’ve completed both setup scripts
  • 4. ©ThoughtWorks 2018 Commercial in Confidence Our experiences are encapsulated in 80+ books
  • 5. 5 ABOUT US We are uncovering better ways of developing software by doing it and helping others do it.
  • 7. 7 TODAY’S PLAN Share principles and practices that can make it easier for teams to iteratively deploy better ML products Share about what to strive towards, and how to strive towards it
  • 8. ● Questions are welcome (esp. if we start speaking Greek) ● Use the stickies ○ Red: “I need help!” ○ Yellow: “You’re using too much jargon!” ● Parking lot ● Cross-talking ● Punctuality 8 SOME GROUND RULES
  • 9. 9 Time Session 09.00am - 09.30am Debugging setup (if anyone needs help) 09.30am - 10.30am Intro to agile + continuous intelligence 10.45am - 11.00am Learn enough Docker to be dangerous 11.00am - 12.30pm Dojo: Hands on exercise for continuous intelligence 12.30pm - 1.30pm Lunch 1.30pm - 3.00pm User experience 3.15pm - 4.45pm Dojo: You can’t do continuous delivery without unit tests 5.00pm - 5.30pm General discussion + Q&A TODAY’S SCHEDULE
  • 10. LEARNING CHECKLIST 10 ❏ Sessions ❏ Environment management with Docker ❏ User experience / product thinking ❏ Continuous integration + Continuous delivery ❏ Test pyramid and unit testing ❏ General discussion ❏ Reuse data processing pipelines to reduce complexity and training-serving skew ❏ Explainability ❏ Model tracking and monitoring strategies (request shadowing) ❏ Monitor what we care about (metrics, business outcomes, fairness) ❏ Closing the data collection loop ❏ Cross-functional teams ❏ Kaizen health checklists ❏ etc.
  • 11. Intro to agile + continuous intelligence
  • 12. ● What do we mean by agile? ● Why should we apply agile to machine learning? ● Pain points in machine learning ● How can agile + continuous delivery practices solve these pain points? 12 SESSION PLAN
  • 13. What do we really mean by “agile”?
  • 15. 15 [1] Royce, Winston. "Managing the Development of Large Software Systems", Proceedings of IEEE WESCON26 (August): 1–9. 1970. [2] Bell, Thomas E., and T. A. Thayer. "Software requirements: Are they really a problem?”, Proceedings of the 2nd international conference on Software engineering. IEEE Computer Society Press, 1976. AGILE VS. WATERFALL
  • 16. 16 design code test release A WATERFALL RELEASE
  • 17. 17 design code test release Deployment issues Defects Product changes A WATERFALL RELEASE
  • 18. Deliver value continuously through working software Shorten feedback loops Technical practices 18 AGILE IN 1 MINUTE
  • 19. … we have come to value: Individuals and interactions over processes and tools Working software over comprehensive documentation Customer collaboration over contract negotiation Responding to change over following a plan That is, while there is value in the items on the right, we value the items on the left more. 19 AGILE MANIFESTO
  • 20. Why should we apply agile to machine learning?
  • 21. Many of the challenges we face in ML are solved problems in software engineering 21
  • 22. 23Source: Machine Learning: The High Interest Credit Card of Technical Debt (Google, 2015) WE GOT 99 PROBLEMS AND MACHINE LEARNING AIN’T ONE
  • 23. 24 THIS IS WHAT MACHINE LEARNING CAN FEEL LIKE
  • 24. 25 We don’t have a machine learning problem. We have a {UX, business, data, software delivery, ML} problem Source: Machine Learning: The High Interest Credit Card of Technical Debt (Google, 2015) WE GOT 99 PROBLEMS AND MACHINE LEARNING AIN’T ONE
  • 26. Leveraging machine learning techniques to exhibit intelligent behavior, and take autonomous actions from data insights. Gain insights from data to inform decision making, including descriptive and diagnostic analytics. Ability to design and build data platforms, collecting, streaming and managing enterprise-wide data, ready for analysis MACHINE INTELLIGENCE DATA INSIGHTS DATA PLATFORM ENGINEERING Uncovering data opportunities and guiding the vision for transformation organizations to become data-led DATA STRATEGY SOFTWARE EXCELLENCE AND PRODUCT THINKING THOUGHTWORKS’ APPROACH TO MACHINE LEARNING / ARTIFICIAL INTELLIGENCE
  • 27. 29Source: The AI hierarchy of needs DELIVERING VALUE - A SLICE AT A TIME
  • 28. PoC Idea Make it simpler Repeat! Test in Lab Deploy to prod Collect, evaluat e Model iteratio n Dark launch or A/B Test in Lab Add value Uncertain how to add value PoC Idea Clear value add ML PRODUCT DEVELOPMENT SHOULD BE ITERATIVE, NOT BIG BANG
  • 29. Pain points in building machine learning products
  • 30. “Works on my machine!” No data / Data is everywhere but nowhere Data stitching (web scraping, api calls, csv files) Not allowed to have production data on my laptop Untitled 17.ipynb 32 Deployment / infra work is hard Hard to keep track of hyperparameters & metrics QA is hard Is my model doing ok? When should I retrain/re- release? Training-serving skew Interpretability “I want 100% accuracy” Harmful models in prod Users not using our product Reproducibility Dan the data scientist ML model in production
  • 31. How can agile + continuous delivery practices solve these problems?
  • 32. “Works on my machine!” No data / Data is everywhere but nowhere Data stitching (web scraping, api calls, csv files) Not allowed to have production data on my laptop Untitled 17.ipynb 34 Deployment / infra work is hard Hard to keep track of hyperparameters & metrics QA is hard Is my model doing ok? When should I retrain/re- release? Training-serving skew Interpretability “I want 100% accuracy” Harmful models in prod Users not using our product Reproducibility WHAT PROBLEMS DOES CONTINUOUS DELIVERY SOLVE?
  • 33. 36 CONTINUOUS DELIVERY PIPELINE Run unit tests Deploy candidate model to STAGING Deploy model to PROD Train and evaluate model push Source code repository trigger feedback Model repositor y Data / feature repository Local env Model repositor y Source: Continuous Delivery (Jez Humble, Dave Farley)
  • 34. 37 ANATOMY OF A PIPELINE ● Pipeline ○ Commit stage ■ build ■ run unit tests ■ train model ■ evaluate model → artifact ○ Deploy to staging ■ deploy ■ policy layer tests ■ fairness tests ■ adversarial tests ■ etc. ○ Deploy to prod ■ deploy
  • 35. 38 GIT PUSH → [SERIES OF AUTOMATED TESTS] → DEPLOY
  • 37. CONTINUOUS DELIVERY CHECKLIST FOR ML PRODUCTS 40 Source control ● All code changes / model parameter changes are checked into source control ● Trunk-based development ● Code reuse Configuration management ● Automated configuration management across environments (local, qa, prod) Data processing ● Feature engineering is done through reusable data pipelines ● Data ingestion pipelines are mature, tested, reusable and automatable ● Regularly used features are precompiled into a feature ‘store’ ● Collecting more and better training data from production, with every release (garbage in, garbage out problem) ● Create data turking systems for labelling new data (necessary for monitoring and re-training) ● Self-service data access ● Data access control Training ● Automated infrastructure provisioning and configuration for model training ● Distributed training where necessary Testing ● Test pyramid (unit tests, functional tests, policy layer tests, exploratory tests) ● Bias testing and fairness testing ● Adversarial testing ● Established baseline for evaluating model performance
  • 38. 41 CONTINUOUS DELIVERY CHECKLIST FOR ML PRODUCTS Artifact versioning ● All trained models are artifacted and versioned ● Tag artifacts with relevant metadata (e.g. training data, hyperparameters, datetime) Deployment ● Set up continuous delivery pipeline ● Tracer bullet. Start with simple model+features ● Single-command deployments ● Disaster recovery: (single-command) deployment of last good model in production ● Frequent deployments to production Policy layer ● Don’t leave critical things to probability (Use rules / heuristics instead) Monitoring ● Understand model performance in production using canary releases ● Monitor business metrics ● Monitor ML metrics (e.g. RMSE) tests (i) on models, (ii) using latest prod data ● Monitor anything that helps model interpretation (e.g. confusion matrices) ● Alerts and automated retraining of model candidates when/before performance begins to slip Workflow ● Build cross-functional teams (UX, BA, DS, DE, DEV, etc) ● Iterative development lifecycle Regular health checks ● How much calendar time to deploy a model from staging to production? ● How much calendar time to add a new feature to the production model? ● How comfortable does your team feel about iteratively deploying models?

Notas do Editor

  1. Let me share ThoughtWorks’ approach to machine learning
  2. We’re a software consultancy company that specialises in agile software delivery. Check out our website. We have insights articles, podcasts, tech radar and more.
  3. Voiceover: We are not just implementers. We are creators, authors, bloggers and speakers who are constantly pushing the state of the art and championing the development of an ecosystem that brings competitive advantage to the enterprise. We are proud to help shape the community by leveraging our learnings and experiences in delivering complex systems to create thought leadership. We’ve also written over 80 books on topics ranging from programming languages to architecture, software engineering patterns and practices, continuous delivery, data management, analytics, experience design and building adaptive and responsive organisations. We wrote the book on complex delivery, literally. Our Technology Radar is read by over 25,000 people on the day it’s released every quarter. In it, we review new commercial and opensource technologies on the horizon and discuss their applicability to the enterprise, based upon our own practical experience. We make recommendations for where you might gain competitive advantage by adopting some new technologies early, and perhaps avoid pitfalls by waiting to adopt others. Notes:
  4. Caveat: I’ve only been in ThoughtWorks for 2 years, so I haven’t been on many projects. But what I share are based on my experience seeing/being on data projects, and also more importantly, it’s also based on our experience collectively as ThoughtWorks in this space. Think of it as what we know, from projects around the globe - Australia, US, Singapore, etc.
  5. Warn them that the workshop will be quite interactive
  6. Go through schedule What is a dojo: A school for training in Japanese arts of self-defense, such as judo and karate.
  7. Warn them that the workshop will be quite interactive
  8. Ask the audience: “what does it mean to be agile?”
  9. 1970 Long feedback loops – by the time we find problems it’s too late to fix them. “the implementation described above is risky and invites failure. “ Royce: "Figure 10 summarizes the five steps that I feel necessary to transform a risky development process into one that will provide the desired product. I would emphasize that each item costs some additional sum of money. If the relatively simpler process without the five complexities described here would work successfully, then of course the additional money is not well spent. Ii, my experience, however, the simpler method has never worked on large software development efforts and the costs to recover far exceeded those required to finance the five-step process listed.” “I believe in this concept, but the implementation described above is risky and invites failure. “
  10. CALL OUT: What problems are likely with this approach?
  11. All the problems come at the end
  12. Agile is as the word suggests: the ability to be quick. It’s not just rituals and ceremonies. When user’s needs change, we should be able to change code and get it into production within days or weeks. Agile prevents this by delivering value iteratively, rather than in big bang approaches. Technical practices: Automated testing, TDD, unit testing Test pyramid Infrastructure automation DevOps CI pipelines Softer practices Retrospectives Feedback
  13. Tools are important, but should never be at the expense of people. 2 types of documentation – how to use, how to maintain Better to work together as partners FEEDBACK LOOPS
  14. Some of you might have seen this picture before. It’s from Google (2015). It highlights the problems that we have faced before. All we wanted to do was to write some train some machine learning model and feel awesome, but then we encounter countless challenges (name some of them...) Complexity is inevitable. That's why we need to build software that constantly manages and partitions complexity. So that we can keep growing software that can evolve and adapt to changing requirements
  15. This is what it feels like to be doing machine learning, most of the time. (let gif play) We want to train a model, and we find out we need data first. To get data, we need to wait for access clearance.
  16. All we wanted to do was to write some train some machine learning model and feel awesome, but then we encounter countless challenges (name some of them...) Complexity is inevitable. That's why we need to build software that constantly manages and partitions complexity. So that we can keep growing software that can evolve and adapt to changing requirements
  17. We often find ourselves in a high-experimentation-low-engineering environment, and while that's good for experimentation, it's bad for delivering high quality software to users. The ML products we've delivered sit on the low-experimentation-high-engineering spectrum. That allowed us to make code easy to change, maintain, etc. etc.
  18. (animate picture to disappear) Stages of maturity / readiness for ML. Just as we can't expect a baby “just” walk, we can't expect an organisation to just "do ML". ML is not data scientists’ capability, it’s an organisational capability There needs to be prior capabilities, people, processes, infrastructure and tooling to enable this. And at ThoughtWorks, we believe that the best way is to find a problem to solve, and grow that capability organically, by building working software.
  19. Data strategy - align intelligence to the goals, provide right org structure/incentives to get different teams to share data to unlock the value.
  20. Go through the idea of thin slices Underlying it all, to consider ethical consequences.
  21. We often hear that organisations have many PoCs, but they are unsure how to derive value (HSBC 150 AI prototypes?) With an approach to continuous intelligence, we can turn this problem on its head, because we can safely deploy experiments to production So we start by find the simplest thing that adds value and figure out how to deploy that - you might not have the infrastructure yet, but the thought experiment at least resolves some of the uncertainty of the pure PoC approach, and the assumption that production deployment should be costly This thinking shows how you get on the ladder on the previous slide
  22. So in a few minutes we will be deep diving into one of the practices that help us be agile - continuous delivery. Such practices solve particular problems, and I think we can better appreciate the value of the practices if we know what kinds of problems / pain points it can solve So i want to take a few minutes to do a short pain points canvassing.
  23. (read the room, and consider doing an interactive canvassing exercise if the audience is ready) After pain points canvas slide - so is there a way out of this pain?
  24. 3 things Deployment pipelines Data processing pipelines Monitoring
  25. Some of these problems that we face in the ML space are solved problems in the software engineering space.
  26. Repeat the game 3x Moral of the game: We deliver value faster if we Continuously integrate/push small chunks of code Reduce wait time between team members (data scientists, devs, QA, Ops, etc) Pushing code is easy. But ensuring quality and that code results in value for users - is not a given. For that, we need the CD pipeline.
  27. I’m gonna talk about the key concepts in CD pipeline Continuous delivery pipeline. It gives us fast feedback 30 seconds - quick overview of this. The model goes through different stages Each of them solves a different problem, which we’ll talk about next Generalizable approach: we can see it working for classifiers, regression models, deep learning models, NLP models, etc. Tracer bullet - build this pipeline as early as possible in your project, so that you can put models in production as soon as possible, so all subsequent deploys is as simple as a push and a click Last point - as the artifact goes down this pipeline, our confidence in it increases
  28. Share the litmus test of continuous delivery: when you can deploy from a beach
  29. 3 things Deployment pipelines Data processing pipelines Monitoring