Taming the reproducibility crisis

Lars Albertsson
Lars AlbertssonFounder & Data Engineer
www.scling.com
Taming the
reproducibility crisis
Nordic data science and machine learning summit
2019-10-16
Lars Albertsson, founder @ Scling
1
www.scling.com
A typical data science journey, phase one
● Data scientists in a corner
○ Weak engineering support
○ Weak product connection
● Manually exported data
● Single version of datasets
○ Good reproducibility
● Reuse data until overfit
2
The lab
www.scling.com
Tell us a story
● Great tool for
○ Displaying
○ Data story telling
○ Personal playground
● Less suitable for
○ Scientific experimentation
○ Collaboration
○ Production
● Hidden state, out-of-order execution, difficult to reuse, weak IDE, no lint, no modularity, scaling, …
○ Joel Grus: “I don’t like notebooks”, https://youtu.be/7jiPeIFXb6U
3
www.scling.com
A typical data science journey, next step
4
The lab
Data lake
Flowing
experiment
www.scling.com
A typical data science journey, phase two
● Data scientists + data engineers
○ Pipelines, fresh data
● Historical data. Whoosh!
● Train on all data until now
○ Changes every day
● Evaluate model on new data
○ Avoid manual overfit. Swell!
○ Changes every day
5
Data lake
Flowing
experiment
www.scling.com
Changing data, volatile workflows
● Data scientists + data engineers
○ Pipelines, fresh data
● Historical data. Whee!
● Train on all data until now
○ Changes every day
● Evaluate model on new data
○ Avoid manual overfit. Swell!
○ Changes every day
6
www.scling.com
Data unscience
7
www.scling.com
Data unengineering
8
www.scling.com
Data unengineering
9
How to I test the pipeline?
You temporarily change the
output path and run manually.
See if the output looks good.
Don’t do that.
What if I forget to change path?
www.scling.com
Typical data science journey, phase three
10
The lab
Flowing experiment
Data lake
Flowing
experiment
Integrated
iterative
Data lake
www.scling.com
Reproducibility starts to matter
● Initially large strides
● Diminishing returns →
Precision measurement →
Reproducible experiment
● Tame reproducibility or
slow innovation
11
Integrated
iterative
Data lake
www.scling.com
Reproducibility, technical view
● Train on known data
○ Batch only, never streaming
○ Explicitly enumerated datasets
○ No live sources
○ Not “all data that we have” or “latest state”
● Mastering workflow orchestration is key
● Lineage & provenance will become focus
○ Current tooling inadequate
● Random == not reproducible
○ But necessary for training
12
www.scling.com
Heathen data science - 2019
13
Please send me a copy of
the latest model.
20 steps from model
to production.
6 months to production.
Different data science /
development / QA teams.
Which data were used
to build this model?
Bash script for building
model from data.
No feedback loop from
operations to data scientists.
Which hyperparameters
should we use?
The model can only be
applied in this environment.
Code represented as
notebooks.
www.scling.com
Heathen software engineering - 1999
14
Please send me a copy of
the latest source code.
20 steps from source
to production.
Different development /
QA / operations teams.
Which files were used
to build this version?
Bash script for building
artifacts from source.
No feedback loop from
operations to development.
Which compiler flags
should we use?
6 month release cycle.
The build only works on this
machine.
Code represented as
UML models.
www.scling.com
Two decades of software engineering later
15
Team formation along
value streams - DevOps.
Everything as
configuration (or code),
in version control.
Immutable artifacts,
(hermetically) rebuilt
from source.
Continuous delivery (and
continuous integration)
with swift quality feedback.
www.scling.com
Development
Value stream team formation - DevOps
16
QA
Operations
Value stream
Product A
Product B
Product C
www.scling.com
Data science
Value stream team formation - DataOps
17
Data engineering
Operations
Value stream
Product A
Product B
Product C
www.scling.com
Immutable artifacts from source
18
Test Deploy
ELF
WAR
Container image
Source code
Build system
CI / CD pipeline
● Nobody wants to work without
○ But some still do
● Strong workflow from source
○ Not yet hermetic
● Immutable code artifacts
www.scling.com
Immutable models from raw data
19
Eval Deploy
Container image +
stored model
Cold store data
Workflow orchestration
Data pipeline
● Nobody wants to work without
○ Most are not aware
● Strong workflow from raw data
○ Hermetic?
● Immutable data artifacts
● Key component:
workflow orchestrator
● Train in batch
○ Reproducible
○ Infer in batch/stream/online
www.scling.com
Everything as config (or code)
● Business logic
● Test code + test data
● Application configuration
● Deployment & dev tooling
● Infrastructure
● Monitoring, alert, other ops
Some in weak languages (YAML, HCL).
Prefer code.
20
www.scling.com
Size = effort Credits: “Hidden Technical Debt in
Colour = code complexity Machine Learning Systems”,
Google, NIPS 2015
Everything as config (or code)
● Model code
● Test code + test data
○ Fuzzy testing -
solved problem
● Hyperparameters
● Deployment & dev tooling
● Infrastructure
● Monitoring, alert, other ops
21
Configuration Data collection
Monitoring
Serving
infrastructure
Feature extraction
Process
management tools
Analysis tools
Machine
resource
management
Data
verification
ML
www.scling.com
Continuous delivery (+ CI) with swift feedback
● Short time from code to
production feedback
● There is no tradeoff
speed vs reliability
22
Integrated
iterative
www.scling.com
Swift feedback for machine learning
● Siloed: 6+ months
Cultural work
● Autonomous: 1 month
Technical work, reproducibility
● Coordinated: days
23
Integrated
iterative
Data lake
www.scling.com
Skip to phase three
24
The lab
Flowing experiment
Data lake
Flowing
experiment
Integrated
iterative
Data lake
www.scling.com
Mix data scientists with developers, QA, ops
25
● Expect conflicts in work methods
● Facilitate mutual learning
● Limit scope of weak tools & workflows
○ But don’t force clunky tools on data scientists
Reproducibility is a technical problem with a human solution
Mark Coleman: Inextricably Linked: Reproducibility & Productivity in Data Science & AI
https://youtu.be/eORATxPx1Bw
Product
www.scling.com
Who’s talking?
Lars Albertsson, @lalleal
Ex: Google, Spotify, Schibsted, freelance
Founder:
Scling - data-value-as-a-service
● Siloed: 6+ months
● Autonomous: 1 month
● Coordinated: days
26
Integrated
Iterative
Data lake
Integrated
iterative
1 of 26

Recommended

Mortal analytics - Covid-19 and the problem of data quality by
Mortal analytics - Covid-19 and the problem of data qualityMortal analytics - Covid-19 and the problem of data quality
Mortal analytics - Covid-19 and the problem of data qualityLars Albertsson
416 views43 slides
Data ops in practice - Swedish style by
Data ops in practice - Swedish styleData ops in practice - Swedish style
Data ops in practice - Swedish styleLars Albertsson
408 views59 slides
Eventually, time will kill your data processing by
Eventually, time will kill your data processingEventually, time will kill your data processing
Eventually, time will kill your data processingLars Albertsson
413 views56 slides
Data democratised by
Data democratisedData democratised
Data democratisedLars Albertsson
307 views32 slides
Privacy by design by
Privacy by designPrivacy by design
Privacy by designLars Albertsson
1.9K views44 slides
Engineering data quality by
Engineering data qualityEngineering data quality
Engineering data qualityLars Albertsson
1.3K views50 slides

More Related Content

What's hot

10 ways to stumble with big data by
10 ways to stumble with big data10 ways to stumble with big data
10 ways to stumble with big dataLars Albertsson
1.4K views18 slides
Data ops in practice by
Data ops in practiceData ops in practice
Data ops in practiceLars Albertsson
3K views26 slides
The right side of speed - learning to shift left by
The right side of speed - learning to shift leftThe right side of speed - learning to shift left
The right side of speed - learning to shift leftLars Albertsson
202 views44 slides
DataOps - Lean principles and lean practices by
DataOps - Lean principles and lean practicesDataOps - Lean principles and lean practices
DataOps - Lean principles and lean practicesLars Albertsson
787 views29 slides
Protecting privacy in practice by
Protecting privacy in practiceProtecting privacy in practice
Protecting privacy in practiceLars Albertsson
9.8K views36 slides
Data pipelines from zero to solid by
Data pipelines from zero to solidData pipelines from zero to solid
Data pipelines from zero to solidLars Albertsson
10.7K views58 slides

What's hot(20)

10 ways to stumble with big data by Lars Albertsson
10 ways to stumble with big data10 ways to stumble with big data
10 ways to stumble with big data
Lars Albertsson1.4K views
The right side of speed - learning to shift left by Lars Albertsson
The right side of speed - learning to shift leftThe right side of speed - learning to shift left
The right side of speed - learning to shift left
Lars Albertsson202 views
DataOps - Lean principles and lean practices by Lars Albertsson
DataOps - Lean principles and lean practicesDataOps - Lean principles and lean practices
DataOps - Lean principles and lean practices
Lars Albertsson787 views
Protecting privacy in practice by Lars Albertsson
Protecting privacy in practiceProtecting privacy in practice
Protecting privacy in practice
Lars Albertsson9.8K views
Data pipelines from zero to solid by Lars Albertsson
Data pipelines from zero to solidData pipelines from zero to solid
Data pipelines from zero to solid
Lars Albertsson10.7K views
Testing data streaming applications by Lars Albertsson
Testing data streaming applicationsTesting data streaming applications
Testing data streaming applications
Lars Albertsson4K views
Data Pipline Observability meetup by Omid Vahdaty
Data Pipline Observability meetup Data Pipline Observability meetup
Data Pipline Observability meetup
Omid Vahdaty371 views
Design Patterns for Machine Learning in Production - Sergei Izrailev, Chief D... by Sri Ambati
Design Patterns for Machine Learning in Production - Sergei Izrailev, Chief D...Design Patterns for Machine Learning in Production - Sergei Izrailev, Chief D...
Design Patterns for Machine Learning in Production - Sergei Izrailev, Chief D...
Sri Ambati4.1K views
Neo4j-Databridge: Enterprise-scale ETL for Neo4j by Neo4j
Neo4j-Databridge: Enterprise-scale ETL for Neo4jNeo4j-Databridge: Enterprise-scale ETL for Neo4j
Neo4j-Databridge: Enterprise-scale ETL for Neo4j
Neo4j424 views
Continuous delivery for machine learning by Rajesh Muppalla
Continuous delivery for machine learningContinuous delivery for machine learning
Continuous delivery for machine learning
Rajesh Muppalla2.9K views
Building Reactive Real-time Data Pipeline by Trieu Nguyen
Building Reactive Real-time Data PipelineBuilding Reactive Real-time Data Pipeline
Building Reactive Real-time Data Pipeline
Trieu Nguyen6K views
Training Series: Build APIs with Neo4j GraphQL Library by Neo4j
Training Series: Build APIs with Neo4j GraphQL LibraryTraining Series: Build APIs with Neo4j GraphQL Library
Training Series: Build APIs with Neo4j GraphQL Library
Neo4j561 views
Reducing Cost of Production ML: Feature Engineering Case Study by Venkata Pingali
Reducing Cost of Production ML: Feature Engineering Case StudyReducing Cost of Production ML: Feature Engineering Case Study
Reducing Cost of Production ML: Feature Engineering Case Study
Venkata Pingali432 views
Full Stack Graph in the Cloud by Neo4j
Full Stack Graph in the CloudFull Stack Graph in the Cloud
Full Stack Graph in the Cloud
Neo4j377 views
Offload, Transform, and Present - The New World of Data Integration by gluent.
Offload, Transform, and Present - The New World of Data IntegrationOffload, Transform, and Present - The New World of Data Integration
Offload, Transform, and Present - The New World of Data Integration
gluent.595 views
How to design and implement a data ops architecture with sdc and gcp by Joseph Arriola
How to design and implement a data ops architecture with sdc and gcpHow to design and implement a data ops architecture with sdc and gcp
How to design and implement a data ops architecture with sdc and gcp
Joseph Arriola394 views

Similar to Taming the reproducibility crisis

Data engineering in 10 years.pdf by
Data engineering in 10 years.pdfData engineering in 10 years.pdf
Data engineering in 10 years.pdfLars Albertsson
841 views52 slides
Crossing the data divide by
Crossing the data divideCrossing the data divide
Crossing the data divideLars Albertsson
3 views31 slides
Holistic data application quality by
Holistic data application qualityHolistic data application quality
Holistic data application qualityLars Albertsson
396 views30 slides
Secure software supply chain on a shoestring budget by
Secure software supply chain on a shoestring budgetSecure software supply chain on a shoestring budget
Secure software supply chain on a shoestring budgetLars Albertsson
268 views49 slides
Dirty data? Clean it up! - Datapalooza Denver 2016 by
Dirty data? Clean it up! - Datapalooza Denver 2016Dirty data? Clean it up! - Datapalooza Denver 2016
Dirty data? Clean it up! - Datapalooza Denver 2016Dan Lynn
1.3K views37 slides
Machine Learning Infrastructure by
Machine Learning InfrastructureMachine Learning Infrastructure
Machine Learning InfrastructureSigOpt
621 views38 slides

Similar to Taming the reproducibility crisis(20)

Data engineering in 10 years.pdf by Lars Albertsson
Data engineering in 10 years.pdfData engineering in 10 years.pdf
Data engineering in 10 years.pdf
Lars Albertsson841 views
Holistic data application quality by Lars Albertsson
Holistic data application qualityHolistic data application quality
Holistic data application quality
Lars Albertsson396 views
Secure software supply chain on a shoestring budget by Lars Albertsson
Secure software supply chain on a shoestring budgetSecure software supply chain on a shoestring budget
Secure software supply chain on a shoestring budget
Lars Albertsson268 views
Dirty data? Clean it up! - Datapalooza Denver 2016 by Dan Lynn
Dirty data? Clean it up! - Datapalooza Denver 2016Dirty data? Clean it up! - Datapalooza Denver 2016
Dirty data? Clean it up! - Datapalooza Denver 2016
Dan Lynn1.3K views
Machine Learning Infrastructure by SigOpt
Machine Learning InfrastructureMachine Learning Infrastructure
Machine Learning Infrastructure
SigOpt621 views
An Analytics Engineer’s Guide to Streaming With Amy Chen | Current 2022 by HostedbyConfluent
An Analytics Engineer’s Guide to Streaming With Amy Chen | Current 2022An Analytics Engineer’s Guide to Streaming With Amy Chen | Current 2022
An Analytics Engineer’s Guide to Streaming With Amy Chen | Current 2022
HostedbyConfluent458 views
Artificial Intelligence in practice - Gerbert Kaandorp - Codemotion Amsterdam... by Codemotion
Artificial Intelligence in practice - Gerbert Kaandorp - Codemotion Amsterdam...Artificial Intelligence in practice - Gerbert Kaandorp - Codemotion Amsterdam...
Artificial Intelligence in practice - Gerbert Kaandorp - Codemotion Amsterdam...
Codemotion263 views
Day 2 (Lecture 5): A Practitioner's Perspective on Building Machine Product i... by Aseda Owusua Addai-Deseh
Day 2 (Lecture 5): A Practitioner's Perspective on Building Machine Product i...Day 2 (Lecture 5): A Practitioner's Perspective on Building Machine Product i...
Day 2 (Lecture 5): A Practitioner's Perspective on Building Machine Product i...
Continuous Intelligence Workshop by David Tan
Continuous Intelligence WorkshopContinuous Intelligence Workshop
Continuous Intelligence Workshop
David Tan193 views
CD in Machine Learning Systems by Thoughtworks
CD in Machine Learning SystemsCD in Machine Learning Systems
CD in Machine Learning Systems
Thoughtworks1.1K views
Production ready big ml workflows from zero to hero daniel marcous @ waze by Ido Shilon
Production ready big ml workflows from zero to hero daniel marcous @ wazeProduction ready big ml workflows from zero to hero daniel marcous @ waze
Production ready big ml workflows from zero to hero daniel marcous @ waze
Ido Shilon1.8K views
Production-Ready BIG ML Workflows - from zero to hero by Daniel Marcous
Production-Ready BIG ML Workflows - from zero to heroProduction-Ready BIG ML Workflows - from zero to hero
Production-Ready BIG ML Workflows - from zero to hero
Daniel Marcous2.2K views
Dirty Data? Clean it up! - Rocky Mountain DataCon 2016 by Dan Lynn
Dirty Data? Clean it up! - Rocky Mountain DataCon 2016Dirty Data? Clean it up! - Rocky Mountain DataCon 2016
Dirty Data? Clean it up! - Rocky Mountain DataCon 2016
Dan Lynn457 views
Bridging the gap in enterprise AI by Max Pumperla
Bridging the gap in enterprise AIBridging the gap in enterprise AI
Bridging the gap in enterprise AI
Max Pumperla216 views

More from Lars Albertsson

Schema management with Scalameta by
Schema management with ScalametaSchema management with Scalameta
Schema management with ScalametaLars Albertsson
7 views50 slides
How to not kill people - Berlin Buzzwords 2023.pdf by
How to not kill people - Berlin Buzzwords 2023.pdfHow to not kill people - Berlin Buzzwords 2023.pdf
How to not kill people - Berlin Buzzwords 2023.pdfLars Albertsson
34 views51 slides
The 7 habits of data effective companies.pdf by
The 7 habits of data effective companies.pdfThe 7 habits of data effective companies.pdf
The 7 habits of data effective companies.pdfLars Albertsson
252 views44 slides
Ai legal and ethics by
Ai   legal and ethicsAi   legal and ethics
Ai legal and ethicsLars Albertsson
200 views6 slides
Eventually, time will kill your data pipeline by
Eventually, time will kill your data pipelineEventually, time will kill your data pipeline
Eventually, time will kill your data pipelineLars Albertsson
936 views54 slides
Big data == lean data by
Big data == lean dataBig data == lean data
Big data == lean dataLars Albertsson
226 views17 slides

More from Lars Albertsson(10)

How to not kill people - Berlin Buzzwords 2023.pdf by Lars Albertsson
How to not kill people - Berlin Buzzwords 2023.pdfHow to not kill people - Berlin Buzzwords 2023.pdf
How to not kill people - Berlin Buzzwords 2023.pdf
Lars Albertsson34 views
The 7 habits of data effective companies.pdf by Lars Albertsson
The 7 habits of data effective companies.pdfThe 7 habits of data effective companies.pdf
The 7 habits of data effective companies.pdf
Lars Albertsson252 views
Eventually, time will kill your data pipeline by Lars Albertsson
Eventually, time will kill your data pipelineEventually, time will kill your data pipeline
Eventually, time will kill your data pipeline
Lars Albertsson936 views
Test strategies for data processing pipelines, v2.0 by Lars Albertsson
Test strategies for data processing pipelines, v2.0Test strategies for data processing pipelines, v2.0
Test strategies for data processing pipelines, v2.0
Lars Albertsson2.7K views
A primer on building real time data-driven products by Lars Albertsson
A primer on building real time data-driven productsA primer on building real time data-driven products
A primer on building real time data-driven products
Lars Albertsson951 views
Test strategies for data processing pipelines by Lars Albertsson
Test strategies for data processing pipelinesTest strategies for data processing pipelines
Test strategies for data processing pipelines
Lars Albertsson5.2K views
Building real time data-driven products by Lars Albertsson
Building real time data-driven productsBuilding real time data-driven products
Building real time data-driven products
Lars Albertsson2.8K views

Recently uploaded

[DSC Europe 23] Predrag Ilic & Simeon Rilling - From Data Lakes to Data Mesh ... by
[DSC Europe 23] Predrag Ilic & Simeon Rilling - From Data Lakes to Data Mesh ...[DSC Europe 23] Predrag Ilic & Simeon Rilling - From Data Lakes to Data Mesh ...
[DSC Europe 23] Predrag Ilic & Simeon Rilling - From Data Lakes to Data Mesh ...DataScienceConferenc1
10 views18 slides
6498-Butun_Beyinli_Cocuq-Daniel_J.Siegel-Tina_Payne_Bryson-2011-259s.pdf by
6498-Butun_Beyinli_Cocuq-Daniel_J.Siegel-Tina_Payne_Bryson-2011-259s.pdf6498-Butun_Beyinli_Cocuq-Daniel_J.Siegel-Tina_Payne_Bryson-2011-259s.pdf
6498-Butun_Beyinli_Cocuq-Daniel_J.Siegel-Tina_Payne_Bryson-2011-259s.pdf10urkyr34
7 views259 slides
CRM stick or twist workshop by
CRM stick or twist workshopCRM stick or twist workshop
CRM stick or twist workshopinfo828217
14 views16 slides
[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo... by
[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo...[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo...
[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo...DataScienceConferenc1
9 views77 slides
Chapter 3b- Process Communication (1) (1)(1) (1).pptx by
Chapter 3b- Process Communication (1) (1)(1) (1).pptxChapter 3b- Process Communication (1) (1)(1) (1).pptx
Chapter 3b- Process Communication (1) (1)(1) (1).pptxayeshabaig2004
8 views30 slides
META.pptx by
META.pptxMETA.pptx
META.pptxvasanthan19012003
6 views10 slides

Recently uploaded(20)

[DSC Europe 23] Predrag Ilic & Simeon Rilling - From Data Lakes to Data Mesh ... by DataScienceConferenc1
[DSC Europe 23] Predrag Ilic & Simeon Rilling - From Data Lakes to Data Mesh ...[DSC Europe 23] Predrag Ilic & Simeon Rilling - From Data Lakes to Data Mesh ...
[DSC Europe 23] Predrag Ilic & Simeon Rilling - From Data Lakes to Data Mesh ...
6498-Butun_Beyinli_Cocuq-Daniel_J.Siegel-Tina_Payne_Bryson-2011-259s.pdf by 10urkyr34
6498-Butun_Beyinli_Cocuq-Daniel_J.Siegel-Tina_Payne_Bryson-2011-259s.pdf6498-Butun_Beyinli_Cocuq-Daniel_J.Siegel-Tina_Payne_Bryson-2011-259s.pdf
6498-Butun_Beyinli_Cocuq-Daniel_J.Siegel-Tina_Payne_Bryson-2011-259s.pdf
10urkyr347 views
CRM stick or twist workshop by info828217
CRM stick or twist workshopCRM stick or twist workshop
CRM stick or twist workshop
info82821714 views
[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo... by DataScienceConferenc1
[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo...[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo...
[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo...
Chapter 3b- Process Communication (1) (1)(1) (1).pptx by ayeshabaig2004
Chapter 3b- Process Communication (1) (1)(1) (1).pptxChapter 3b- Process Communication (1) (1)(1) (1).pptx
Chapter 3b- Process Communication (1) (1)(1) (1).pptx
ayeshabaig20048 views
Dr. Ousmane Badiane-2023 ReSAKSS Conference by AKADEMIYA2063
Dr. Ousmane Badiane-2023 ReSAKSS ConferenceDr. Ousmane Badiane-2023 ReSAKSS Conference
Dr. Ousmane Badiane-2023 ReSAKSS Conference
AKADEMIYA20635 views
OECD-Persol Holdings Workshop on Advancing Employee Well-being in Business an... by StatsCommunications
OECD-Persol Holdings Workshop on Advancing Employee Well-being in Business an...OECD-Persol Holdings Workshop on Advancing Employee Well-being in Business an...
OECD-Persol Holdings Workshop on Advancing Employee Well-being in Business an...
[DSC Europe 23] Zsolt Feleki - Machine Translation should we trust it.pptx by DataScienceConferenc1
[DSC Europe 23] Zsolt Feleki - Machine Translation should we trust it.pptx[DSC Europe 23] Zsolt Feleki - Machine Translation should we trust it.pptx
[DSC Europe 23] Zsolt Feleki - Machine Translation should we trust it.pptx
[DSC Europe 23] Ivan Dundovic - How To Treat Your Data As A Product.pptx by DataScienceConferenc1
[DSC Europe 23] Ivan Dundovic - How To Treat Your Data As A Product.pptx[DSC Europe 23] Ivan Dundovic - How To Treat Your Data As A Product.pptx
[DSC Europe 23] Ivan Dundovic - How To Treat Your Data As A Product.pptx
CRM stick or twist.pptx by info828217
CRM stick or twist.pptxCRM stick or twist.pptx
CRM stick or twist.pptx
info82821711 views
[DSC Europe 23][AI:CSI] Aleksa Stojanovic - Applying AI for Threat Detection ... by DataScienceConferenc1
[DSC Europe 23][AI:CSI] Aleksa Stojanovic - Applying AI for Threat Detection ...[DSC Europe 23][AI:CSI] Aleksa Stojanovic - Applying AI for Threat Detection ...
[DSC Europe 23][AI:CSI] Aleksa Stojanovic - Applying AI for Threat Detection ...
Data Journeys Hard Talk workshop final.pptx by info828217
Data Journeys Hard Talk workshop final.pptxData Journeys Hard Talk workshop final.pptx
Data Journeys Hard Talk workshop final.pptx
info82821711 views
CRIJ4385_Death Penalty_F23.pptx by yvettemm100
CRIJ4385_Death Penalty_F23.pptxCRIJ4385_Death Penalty_F23.pptx
CRIJ4385_Death Penalty_F23.pptx
yvettemm1007 views
[DSC Europe 23] Matteo Molteni - Implementing a Robust CI Workflow with dbt f... by DataScienceConferenc1
[DSC Europe 23] Matteo Molteni - Implementing a Robust CI Workflow with dbt f...[DSC Europe 23] Matteo Molteni - Implementing a Robust CI Workflow with dbt f...
[DSC Europe 23] Matteo Molteni - Implementing a Robust CI Workflow with dbt f...
SUPER STORE SQL PROJECT.pptx by khan888620
SUPER STORE SQL PROJECT.pptxSUPER STORE SQL PROJECT.pptx
SUPER STORE SQL PROJECT.pptx
khan88862013 views
Short Story Assignment by Kelly Nguyen by kellynguyen01
Short Story Assignment by Kelly NguyenShort Story Assignment by Kelly Nguyen
Short Story Assignment by Kelly Nguyen
kellynguyen0120 views
Best Home Security Systems.pptx by mogalang
Best Home Security Systems.pptxBest Home Security Systems.pptx
Best Home Security Systems.pptx
mogalang9 views
Listed Instruments Survey 2022.pptx by secretariat4
Listed Instruments Survey  2022.pptxListed Instruments Survey  2022.pptx
Listed Instruments Survey 2022.pptx
secretariat452 views

Taming the reproducibility crisis

  • 1. www.scling.com Taming the reproducibility crisis Nordic data science and machine learning summit 2019-10-16 Lars Albertsson, founder @ Scling 1
  • 2. www.scling.com A typical data science journey, phase one ● Data scientists in a corner ○ Weak engineering support ○ Weak product connection ● Manually exported data ● Single version of datasets ○ Good reproducibility ● Reuse data until overfit 2 The lab
  • 3. www.scling.com Tell us a story ● Great tool for ○ Displaying ○ Data story telling ○ Personal playground ● Less suitable for ○ Scientific experimentation ○ Collaboration ○ Production ● Hidden state, out-of-order execution, difficult to reuse, weak IDE, no lint, no modularity, scaling, … ○ Joel Grus: “I don’t like notebooks”, https://youtu.be/7jiPeIFXb6U 3
  • 4. www.scling.com A typical data science journey, next step 4 The lab Data lake Flowing experiment
  • 5. www.scling.com A typical data science journey, phase two ● Data scientists + data engineers ○ Pipelines, fresh data ● Historical data. Whoosh! ● Train on all data until now ○ Changes every day ● Evaluate model on new data ○ Avoid manual overfit. Swell! ○ Changes every day 5 Data lake Flowing experiment
  • 6. www.scling.com Changing data, volatile workflows ● Data scientists + data engineers ○ Pipelines, fresh data ● Historical data. Whee! ● Train on all data until now ○ Changes every day ● Evaluate model on new data ○ Avoid manual overfit. Swell! ○ Changes every day 6
  • 9. www.scling.com Data unengineering 9 How to I test the pipeline? You temporarily change the output path and run manually. See if the output looks good. Don’t do that. What if I forget to change path?
  • 10. www.scling.com Typical data science journey, phase three 10 The lab Flowing experiment Data lake Flowing experiment Integrated iterative Data lake
  • 11. www.scling.com Reproducibility starts to matter ● Initially large strides ● Diminishing returns → Precision measurement → Reproducible experiment ● Tame reproducibility or slow innovation 11 Integrated iterative Data lake
  • 12. www.scling.com Reproducibility, technical view ● Train on known data ○ Batch only, never streaming ○ Explicitly enumerated datasets ○ No live sources ○ Not “all data that we have” or “latest state” ● Mastering workflow orchestration is key ● Lineage & provenance will become focus ○ Current tooling inadequate ● Random == not reproducible ○ But necessary for training 12
  • 13. www.scling.com Heathen data science - 2019 13 Please send me a copy of the latest model. 20 steps from model to production. 6 months to production. Different data science / development / QA teams. Which data were used to build this model? Bash script for building model from data. No feedback loop from operations to data scientists. Which hyperparameters should we use? The model can only be applied in this environment. Code represented as notebooks.
  • 14. www.scling.com Heathen software engineering - 1999 14 Please send me a copy of the latest source code. 20 steps from source to production. Different development / QA / operations teams. Which files were used to build this version? Bash script for building artifacts from source. No feedback loop from operations to development. Which compiler flags should we use? 6 month release cycle. The build only works on this machine. Code represented as UML models.
  • 15. www.scling.com Two decades of software engineering later 15 Team formation along value streams - DevOps. Everything as configuration (or code), in version control. Immutable artifacts, (hermetically) rebuilt from source. Continuous delivery (and continuous integration) with swift quality feedback.
  • 16. www.scling.com Development Value stream team formation - DevOps 16 QA Operations Value stream Product A Product B Product C
  • 17. www.scling.com Data science Value stream team formation - DataOps 17 Data engineering Operations Value stream Product A Product B Product C
  • 18. www.scling.com Immutable artifacts from source 18 Test Deploy ELF WAR Container image Source code Build system CI / CD pipeline ● Nobody wants to work without ○ But some still do ● Strong workflow from source ○ Not yet hermetic ● Immutable code artifacts
  • 19. www.scling.com Immutable models from raw data 19 Eval Deploy Container image + stored model Cold store data Workflow orchestration Data pipeline ● Nobody wants to work without ○ Most are not aware ● Strong workflow from raw data ○ Hermetic? ● Immutable data artifacts ● Key component: workflow orchestrator ● Train in batch ○ Reproducible ○ Infer in batch/stream/online
  • 20. www.scling.com Everything as config (or code) ● Business logic ● Test code + test data ● Application configuration ● Deployment & dev tooling ● Infrastructure ● Monitoring, alert, other ops Some in weak languages (YAML, HCL). Prefer code. 20
  • 21. www.scling.com Size = effort Credits: “Hidden Technical Debt in Colour = code complexity Machine Learning Systems”, Google, NIPS 2015 Everything as config (or code) ● Model code ● Test code + test data ○ Fuzzy testing - solved problem ● Hyperparameters ● Deployment & dev tooling ● Infrastructure ● Monitoring, alert, other ops 21 Configuration Data collection Monitoring Serving infrastructure Feature extraction Process management tools Analysis tools Machine resource management Data verification ML
  • 22. www.scling.com Continuous delivery (+ CI) with swift feedback ● Short time from code to production feedback ● There is no tradeoff speed vs reliability 22 Integrated iterative
  • 23. www.scling.com Swift feedback for machine learning ● Siloed: 6+ months Cultural work ● Autonomous: 1 month Technical work, reproducibility ● Coordinated: days 23 Integrated iterative Data lake
  • 24. www.scling.com Skip to phase three 24 The lab Flowing experiment Data lake Flowing experiment Integrated iterative Data lake
  • 25. www.scling.com Mix data scientists with developers, QA, ops 25 ● Expect conflicts in work methods ● Facilitate mutual learning ● Limit scope of weak tools & workflows ○ But don’t force clunky tools on data scientists Reproducibility is a technical problem with a human solution Mark Coleman: Inextricably Linked: Reproducibility & Productivity in Data Science & AI https://youtu.be/eORATxPx1Bw Product
  • 26. www.scling.com Who’s talking? Lars Albertsson, @lalleal Ex: Google, Spotify, Schibsted, freelance Founder: Scling - data-value-as-a-service ● Siloed: 6+ months ● Autonomous: 1 month ● Coordinated: days 26 Integrated Iterative Data lake Integrated iterative