SlideShare ist ein Scribd-Unternehmen logo
1 von 22
Deploying Data Science Engines to Production
Comparing Options + Code Examples
Mostafa Majidpour Senior Data Scientist at Meredith Corp.
October 20
2018
IDEAS SoCal
About 140 million U.S. monthly unique visitors
• #1 network for women and millennials
https://www.comscore.com/Insights/Rankings 2
Motivating Example
• Scenario:
• User’s browsing a website. We have
access to the user’s cookie and/or past
browsing behavior
• Requirements:
• Involves Predictive Modeling
• Real time/ near real time scoring
3
Machine Learning Pipeline
Creation to Deployment
Deployment
Wall!
• https://speakerdeck.com/szilard/machine-learning-
software-in-practice-quo-vadis-invited-talk-kdd-conference-
applied-data-science-track-august-2017-halifax-canada
5
Deployment:
To be or not
to be?
• According to Rexer Data Science Survey:
• 37% of surveyed data scientists reported
their models are sometimes/rarely
deployed.
• 12% of surveyed data scientists reported
their models are always deployed.
• http://www.rexeranalytics.com/files/Rexer_Data_Science_Survey_Hig
hlights_Apr-2016.pdf
6
Approach 1: Look-up table
● Pre-compute the scores for all possible inputs (or a subset of them)
● Store the scores in a look-up table
+No need for a complex scoring environment
- Table size grows fast with high cardinality features (~50K zip code x …)
- Unused scoring for some permutations
7
Approach 2: Code re-write for deployment
- Time consuming
- Prone to errors
- Existence of comparable packages
- Slows the impact of data science team on the business!
+Ensures higher quality codes
8
Approach 3: Deployable Data Science outcome
What if the DS’s outcome (the ML pipeline) was readily deployable?
+DS develops with more familiar tools (e.g. python & R)
+DE/SWE does not have to re-write the DS outcome (Avoiding code duplication)
+Ensures higher quality code
ML pipeline includes <Pre-transformation + ML Algorithm + Post-transformation>
Scoring Engine
String
Indexer
Normalizer PCA
Logistic
Regression
Scoring Engine
ML Pipeline
Raw Input
Output 9
Deployable Data Science outcome
Available Solutions
Decision
Criteria
Financial cost
Supported languages
in pipeline creation
and runtime
Ability to score
multiple data points
simultaneously
(Dataframe vs. Row)
Support for pre and
post transformations
(ML pipeline vs. ML
model)
SparkML support Scoring Latency
Active community Good documentation
11
Investigated Technologies
● PMML, jPMML
● PFA
● H2O
● Aloha
● Embedded Spark
● mllib-local (Spark)
● MLeap
For detailed comparison: https://www.slideshare.net/formulatedby/a-journey-of-deploying-a-data-science-engine-to-production
Scoring one data point at a time
No support for pre and post transformations
Slower than MLeap
Only works in Scala
Not fast enough
Satisfies our main requirements
Not mature enough
12
MLeap
● Model creation: Python and Scala; Scoring: Scala (Integrates well with Java)
● Supports many transformations and ML models from SparkML, sklearn, TensorFlow, and xgboost
● Active community
● Fast (0.11ms vs. 22ms for Spark)
● Custom transformers
● Even Databricks recommends it: “Databricks recommends MLeap, which is a common serialization
format and execution engine for machine learning pipelines. It supports serializing Apache Spark, scikit-
learn, and TensorFlow pipelines into a bundle, so you can load and deploy your trained models to make
predictions with new data.”
○ https://docs.databricks.com/spark/latest/mllib/index.html#model-export-label
- Inconsistent documentation
https://www.drivenbycode.com/mleap-quickly-release-spark-ml-pipelines/
13
Deployable DS outcome with MLeap
Scoring Engine
MLeap runtime
(JVM)
String
Indexer
Normalizer PCA
Logistic
Regression
Scoring Engine
MLeap runtime
(JVM)
Spark MLlib pipeline as MLeap bundle
Export as
MLeap
bundle
Python, R, Scala, or Java
Java or Scala
Data Science Playground
Production Environment
Raw Input Output 14
MLeap sample code
Spark ML + MLeap bundle + Scoring
Build Spark ML pipeline
16
Export as MLeap Bundle
Use Scala version! ;)
17
Score in JVM (1)
18
Score in JVM (2)
19
Use Case at
Meredith
• Recommend products to
online users
• Legacy system: reduced
dimension lookup table with
simple predictive models
• Proposed system with SparkML
and MLeap: boosted
conversion rate by around 20%
in different releases
20
Summary
● Batch scoring? Do it in DS environment! No deployment needed
● Real time scoring? Relatively small number of input permutations?
○ Look-up table! Simple deployment
○ No! check out MLeap and alike (You do have a sample MLeap code, simple enough to start!)
● Consider deployment solution that exports the whole ML pipeline
● MLeap worked for us! Still needs lots of attention from community
● Not discussed because of cost: Databricks mlflow, Amazon SageMaker , ScienceOPS (yhat),
Anaconda Enterprise, NStack, …
○ Big enterprise solutions are very recent
● Open source possibility: dbml-local (Databricks)
21
Thanks to my colleagues at Meredith!
Thank you!
Questions?
22

Weitere ähnliche Inhalte

Was ist angesagt?

Deep Learning for Large-Scale Online Fraud Detection—Fighting Fraudsters Amon...
Deep Learning for Large-Scale Online Fraud Detection—Fighting Fraudsters Amon...Deep Learning for Large-Scale Online Fraud Detection—Fighting Fraudsters Amon...
Deep Learning for Large-Scale Online Fraud Detection—Fighting Fraudsters Amon...
Databricks
 
ML at the Edge: Building Your Production Pipeline with Apache Spark and Tens...
 ML at the Edge: Building Your Production Pipeline with Apache Spark and Tens... ML at the Edge: Building Your Production Pipeline with Apache Spark and Tens...
ML at the Edge: Building Your Production Pipeline with Apache Spark and Tens...
Databricks
 
Operationalizing Edge Machine Learning with Apache Spark with Nisha Talagala ...
Operationalizing Edge Machine Learning with Apache Spark with Nisha Talagala ...Operationalizing Edge Machine Learning with Apache Spark with Nisha Talagala ...
Operationalizing Edge Machine Learning with Apache Spark with Nisha Talagala ...
Databricks
 
Accelerating Deep Learning Training with BigDL and Drizzle on Apache Spark wi...
Accelerating Deep Learning Training with BigDL and Drizzle on Apache Spark wi...Accelerating Deep Learning Training with BigDL and Drizzle on Apache Spark wi...
Accelerating Deep Learning Training with BigDL and Drizzle on Apache Spark wi...
Databricks
 
Code Once Use Often with Declarative Data Pipelines
Code Once Use Often with Declarative Data PipelinesCode Once Use Often with Declarative Data Pipelines
Code Once Use Often with Declarative Data Pipelines
Databricks
 
Deploying and Monitoring Heterogeneous Machine Learning Applications with Cli...
Deploying and Monitoring Heterogeneous Machine Learning Applications with Cli...Deploying and Monitoring Heterogeneous Machine Learning Applications with Cli...
Deploying and Monitoring Heterogeneous Machine Learning Applications with Cli...
Databricks
 
KFServing, Model Monitoring with Apache Spark and a Feature Store
KFServing, Model Monitoring with Apache Spark and a Feature StoreKFServing, Model Monitoring with Apache Spark and a Feature Store
KFServing, Model Monitoring with Apache Spark and a Feature Store
Databricks
 

Was ist angesagt? (20)

Lessons Learned from Using Spark for Evaluating Road Detection at BMW Autonom...
Lessons Learned from Using Spark for Evaluating Road Detection at BMW Autonom...Lessons Learned from Using Spark for Evaluating Road Detection at BMW Autonom...
Lessons Learned from Using Spark for Evaluating Road Detection at BMW Autonom...
 
How to Productionize Your Machine Learning Models Using Apache Spark MLlib 2....
How to Productionize Your Machine Learning Models Using Apache Spark MLlib 2....How to Productionize Your Machine Learning Models Using Apache Spark MLlib 2....
How to Productionize Your Machine Learning Models Using Apache Spark MLlib 2....
 
Deep Learning for Large-Scale Online Fraud Detection—Fighting Fraudsters Amon...
Deep Learning for Large-Scale Online Fraud Detection—Fighting Fraudsters Amon...Deep Learning for Large-Scale Online Fraud Detection—Fighting Fraudsters Amon...
Deep Learning for Large-Scale Online Fraud Detection—Fighting Fraudsters Amon...
 
ML at the Edge: Building Your Production Pipeline with Apache Spark and Tens...
 ML at the Edge: Building Your Production Pipeline with Apache Spark and Tens... ML at the Edge: Building Your Production Pipeline with Apache Spark and Tens...
ML at the Edge: Building Your Production Pipeline with Apache Spark and Tens...
 
When Apache Spark Meets TiDB with Xiaoyu Ma
When Apache Spark Meets TiDB with Xiaoyu MaWhen Apache Spark Meets TiDB with Xiaoyu Ma
When Apache Spark Meets TiDB with Xiaoyu Ma
 
Spark ML Pipeline serving
Spark ML Pipeline servingSpark ML Pipeline serving
Spark ML Pipeline serving
 
Operationalizing Edge Machine Learning with Apache Spark with Nisha Talagala ...
Operationalizing Edge Machine Learning with Apache Spark with Nisha Talagala ...Operationalizing Edge Machine Learning with Apache Spark with Nisha Talagala ...
Operationalizing Edge Machine Learning with Apache Spark with Nisha Talagala ...
 
Productionizing H2O Models with Apache Spark with Jakub Hava and Michal Maloh...
Productionizing H2O Models with Apache Spark with Jakub Hava and Michal Maloh...Productionizing H2O Models with Apache Spark with Jakub Hava and Michal Maloh...
Productionizing H2O Models with Apache Spark with Jakub Hava and Michal Maloh...
 
Generative Hyperloop Design: Managing Massively Scaled Simulations Focused on...
Generative Hyperloop Design: Managing Massively Scaled Simulations Focused on...Generative Hyperloop Design: Managing Massively Scaled Simulations Focused on...
Generative Hyperloop Design: Managing Massively Scaled Simulations Focused on...
 
Accelerating Deep Learning Training with BigDL and Drizzle on Apache Spark wi...
Accelerating Deep Learning Training with BigDL and Drizzle on Apache Spark wi...Accelerating Deep Learning Training with BigDL and Drizzle on Apache Spark wi...
Accelerating Deep Learning Training with BigDL and Drizzle on Apache Spark wi...
 
Serverless machine learning operations
Serverless machine learning operationsServerless machine learning operations
Serverless machine learning operations
 
Code Once Use Often with Declarative Data Pipelines
Code Once Use Often with Declarative Data PipelinesCode Once Use Often with Declarative Data Pipelines
Code Once Use Often with Declarative Data Pipelines
 
Deploying and Monitoring Heterogeneous Machine Learning Applications with Cli...
Deploying and Monitoring Heterogeneous Machine Learning Applications with Cli...Deploying and Monitoring Heterogeneous Machine Learning Applications with Cli...
Deploying and Monitoring Heterogeneous Machine Learning Applications with Cli...
 
The Quest for an Open Source Data Science Platform
 The Quest for an Open Source Data Science Platform The Quest for an Open Source Data Science Platform
The Quest for an Open Source Data Science Platform
 
Leveraging Spark ML for Real-Time Credit Card Approvals with Anand Venugopal ...
Leveraging Spark ML for Real-Time Credit Card Approvals with Anand Venugopal ...Leveraging Spark ML for Real-Time Credit Card Approvals with Anand Venugopal ...
Leveraging Spark ML for Real-Time Credit Card Approvals with Anand Venugopal ...
 
Model Experiments Tracking and Registration using MLflow on Databricks
Model Experiments Tracking and Registration using MLflow on DatabricksModel Experiments Tracking and Registration using MLflow on Databricks
Model Experiments Tracking and Registration using MLflow on Databricks
 
Using Apache Spark for Predicting Degrading and Failing Parts in Aviation
Using Apache Spark for Predicting Degrading and Failing Parts in AviationUsing Apache Spark for Predicting Degrading and Failing Parts in Aviation
Using Apache Spark for Predicting Degrading and Failing Parts in Aviation
 
Developing ML-enabled Data Pipelines on Databricks using IDE & CI/CD at Runta...
Developing ML-enabled Data Pipelines on Databricks using IDE & CI/CD at Runta...Developing ML-enabled Data Pipelines on Databricks using IDE & CI/CD at Runta...
Developing ML-enabled Data Pipelines on Databricks using IDE & CI/CD at Runta...
 
Porting R Models into Scala Spark
Porting R Models into Scala SparkPorting R Models into Scala Spark
Porting R Models into Scala Spark
 
KFServing, Model Monitoring with Apache Spark and a Feature Store
KFServing, Model Monitoring with Apache Spark and a Feature StoreKFServing, Model Monitoring with Apache Spark and a Feature Store
KFServing, Model Monitoring with Apache Spark and a Feature Store
 

Ähnlich wie Deploying Data Science Engines to Production

Media_Entertainment_Veriticals
Media_Entertainment_VeriticalsMedia_Entertainment_Veriticals
Media_Entertainment_Veriticals
Peyman Mohajerian
 

Ähnlich wie Deploying Data Science Engines to Production (20)

Data Science Salon: A Journey of Deploying a Data Science Engine to Production
Data Science Salon: A Journey of Deploying a Data Science Engine to ProductionData Science Salon: A Journey of Deploying a Data Science Engine to Production
Data Science Salon: A Journey of Deploying a Data Science Engine to Production
 
Dev Ops Training
Dev Ops TrainingDev Ops Training
Dev Ops Training
 
Continuous delivery for machine learning
Continuous delivery for machine learningContinuous delivery for machine learning
Continuous delivery for machine learning
 
Tiny Batches, in the wine: Shiny New Bits in Spark Streaming
Tiny Batches, in the wine: Shiny New Bits in Spark StreamingTiny Batches, in the wine: Shiny New Bits in Spark Streaming
Tiny Batches, in the wine: Shiny New Bits in Spark Streaming
 
Low Latency Polyglot Model Scoring using Apache Apex
Low Latency Polyglot Model Scoring using Apache ApexLow Latency Polyglot Model Scoring using Apache Apex
Low Latency Polyglot Model Scoring using Apache Apex
 
Build Deep Learning Applications for Big Data Platforms (CVPR 2018 tutorial)
Build Deep Learning Applications for Big Data Platforms (CVPR 2018 tutorial)Build Deep Learning Applications for Big Data Platforms (CVPR 2018 tutorial)
Build Deep Learning Applications for Big Data Platforms (CVPR 2018 tutorial)
 
Seattle Spark Meetup Mobius CSharp API
Seattle Spark Meetup Mobius CSharp APISeattle Spark Meetup Mobius CSharp API
Seattle Spark Meetup Mobius CSharp API
 
Media_Entertainment_Veriticals
Media_Entertainment_VeriticalsMedia_Entertainment_Veriticals
Media_Entertainment_Veriticals
 
Your Roadmap for An Enterprise Graph Strategy
Your Roadmap for An Enterprise Graph StrategyYour Roadmap for An Enterprise Graph Strategy
Your Roadmap for An Enterprise Graph Strategy
 
Building machine learning service in your business — Eric Chen (Uber) @PAPIs ...
Building machine learning service in your business — Eric Chen (Uber) @PAPIs ...Building machine learning service in your business — Eric Chen (Uber) @PAPIs ...
Building machine learning service in your business — Eric Chen (Uber) @PAPIs ...
 
Your Roadmap for An Enterprise Graph Strategy
Your Roadmap for An Enterprise Graph StrategyYour Roadmap for An Enterprise Graph Strategy
Your Roadmap for An Enterprise Graph Strategy
 
Neo4j GraphTour New York_EY Presentation_Michael Moore
Neo4j GraphTour New York_EY Presentation_Michael MooreNeo4j GraphTour New York_EY Presentation_Michael Moore
Neo4j GraphTour New York_EY Presentation_Michael Moore
 
Architecting an Open Source AI Platform 2018 edition
Architecting an Open Source AI Platform   2018 editionArchitecting an Open Source AI Platform   2018 edition
Architecting an Open Source AI Platform 2018 edition
 
DevOps for DataScience
DevOps for DataScienceDevOps for DataScience
DevOps for DataScience
 
Intro to Spark development
 Intro to Spark development  Intro to Spark development
Intro to Spark development
 
Scaling Ride-Hailing with Machine Learning on MLflow
Scaling Ride-Hailing with Machine Learning on MLflowScaling Ride-Hailing with Machine Learning on MLflow
Scaling Ride-Hailing with Machine Learning on MLflow
 
SnappyData Toronto Meetup Nov 2017
SnappyData Toronto Meetup Nov 2017SnappyData Toronto Meetup Nov 2017
SnappyData Toronto Meetup Nov 2017
 
Introduction to Spark Training
Introduction to Spark TrainingIntroduction to Spark Training
Introduction to Spark Training
 
PayPal datalake journey | teradata - edge of next | san diego | 2017 october ...
PayPal datalake journey | teradata - edge of next | san diego | 2017 october ...PayPal datalake journey | teradata - edge of next | san diego | 2017 october ...
PayPal datalake journey | teradata - edge of next | san diego | 2017 october ...
 
DataMass Summit - Machine Learning for Big Data in SQL Server
DataMass Summit - Machine Learning for Big Data  in SQL ServerDataMass Summit - Machine Learning for Big Data  in SQL Server
DataMass Summit - Machine Learning for Big Data in SQL Server
 

Kürzlich hochgeladen

CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
amitlee9823
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
amitlee9823
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night StandCall Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
amitlee9823
 
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
amitlee9823
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
amitlee9823
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night StandCall Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 

Kürzlich hochgeladen (20)

CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interaction
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
 
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night StandCall Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
 
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
 
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptx
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 
Capstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics ProgramCapstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics Program
 
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightCheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
 
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night StandCall Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
 
Predicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science ProjectPredicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science Project
 
Anomaly detection and data imputation within time series
Anomaly detection and data imputation within time seriesAnomaly detection and data imputation within time series
Anomaly detection and data imputation within time series
 

Deploying Data Science Engines to Production

  • 1. Deploying Data Science Engines to Production Comparing Options + Code Examples Mostafa Majidpour Senior Data Scientist at Meredith Corp. October 20 2018 IDEAS SoCal
  • 2. About 140 million U.S. monthly unique visitors • #1 network for women and millennials https://www.comscore.com/Insights/Rankings 2
  • 3. Motivating Example • Scenario: • User’s browsing a website. We have access to the user’s cookie and/or past browsing behavior • Requirements: • Involves Predictive Modeling • Real time/ near real time scoring 3
  • 6. Deployment: To be or not to be? • According to Rexer Data Science Survey: • 37% of surveyed data scientists reported their models are sometimes/rarely deployed. • 12% of surveyed data scientists reported their models are always deployed. • http://www.rexeranalytics.com/files/Rexer_Data_Science_Survey_Hig hlights_Apr-2016.pdf 6
  • 7. Approach 1: Look-up table ● Pre-compute the scores for all possible inputs (or a subset of them) ● Store the scores in a look-up table +No need for a complex scoring environment - Table size grows fast with high cardinality features (~50K zip code x …) - Unused scoring for some permutations 7
  • 8. Approach 2: Code re-write for deployment - Time consuming - Prone to errors - Existence of comparable packages - Slows the impact of data science team on the business! +Ensures higher quality codes 8
  • 9. Approach 3: Deployable Data Science outcome What if the DS’s outcome (the ML pipeline) was readily deployable? +DS develops with more familiar tools (e.g. python & R) +DE/SWE does not have to re-write the DS outcome (Avoiding code duplication) +Ensures higher quality code ML pipeline includes <Pre-transformation + ML Algorithm + Post-transformation> Scoring Engine String Indexer Normalizer PCA Logistic Regression Scoring Engine ML Pipeline Raw Input Output 9
  • 10. Deployable Data Science outcome Available Solutions
  • 11. Decision Criteria Financial cost Supported languages in pipeline creation and runtime Ability to score multiple data points simultaneously (Dataframe vs. Row) Support for pre and post transformations (ML pipeline vs. ML model) SparkML support Scoring Latency Active community Good documentation 11
  • 12. Investigated Technologies ● PMML, jPMML ● PFA ● H2O ● Aloha ● Embedded Spark ● mllib-local (Spark) ● MLeap For detailed comparison: https://www.slideshare.net/formulatedby/a-journey-of-deploying-a-data-science-engine-to-production Scoring one data point at a time No support for pre and post transformations Slower than MLeap Only works in Scala Not fast enough Satisfies our main requirements Not mature enough 12
  • 13. MLeap ● Model creation: Python and Scala; Scoring: Scala (Integrates well with Java) ● Supports many transformations and ML models from SparkML, sklearn, TensorFlow, and xgboost ● Active community ● Fast (0.11ms vs. 22ms for Spark) ● Custom transformers ● Even Databricks recommends it: “Databricks recommends MLeap, which is a common serialization format and execution engine for machine learning pipelines. It supports serializing Apache Spark, scikit- learn, and TensorFlow pipelines into a bundle, so you can load and deploy your trained models to make predictions with new data.” ○ https://docs.databricks.com/spark/latest/mllib/index.html#model-export-label - Inconsistent documentation https://www.drivenbycode.com/mleap-quickly-release-spark-ml-pipelines/ 13
  • 14. Deployable DS outcome with MLeap Scoring Engine MLeap runtime (JVM) String Indexer Normalizer PCA Logistic Regression Scoring Engine MLeap runtime (JVM) Spark MLlib pipeline as MLeap bundle Export as MLeap bundle Python, R, Scala, or Java Java or Scala Data Science Playground Production Environment Raw Input Output 14
  • 15. MLeap sample code Spark ML + MLeap bundle + Scoring
  • 16. Build Spark ML pipeline 16
  • 17. Export as MLeap Bundle Use Scala version! ;) 17
  • 18. Score in JVM (1) 18
  • 19. Score in JVM (2) 19
  • 20. Use Case at Meredith • Recommend products to online users • Legacy system: reduced dimension lookup table with simple predictive models • Proposed system with SparkML and MLeap: boosted conversion rate by around 20% in different releases 20
  • 21. Summary ● Batch scoring? Do it in DS environment! No deployment needed ● Real time scoring? Relatively small number of input permutations? ○ Look-up table! Simple deployment ○ No! check out MLeap and alike (You do have a sample MLeap code, simple enough to start!) ● Consider deployment solution that exports the whole ML pipeline ● MLeap worked for us! Still needs lots of attention from community ● Not discussed because of cost: Databricks mlflow, Amazon SageMaker , ScienceOPS (yhat), Anaconda Enterprise, NStack, … ○ Big enterprise solutions are very recent ● Open source possibility: dbml-local (Databricks) 21
  • 22. Thanks to my colleagues at Meredith! Thank you! Questions? 22

Hinweis der Redaktion

  1. Available Technologies/Solutions & Decision Factors