SlideShare a Scribd company logo
1 of 44
10 Things I Wish I Had Known
Before Scaling Deep Learning
Solutions
Invector Labs
About Invector Labs
• Platform for top-class computer science talent
• Uses artificial intelligence to connect enterprises with top freelance
talent around the world
• Focused on deep tech
• Artificial intelligence
• Blockchain technologies
• Internet of things
• Cybersecurity
• Advanced cloud computing
• ….
• http://invectorlabs.com
Agenda
• Realities of scaling deep learning solutions
• 10 Lessons
• Challenge
• What we learned?
• Solution
Lessons from the Real World
•Using deep learning to analyze reviews form over 40 travel websites
•12 different deep learning models
•Scenarios: topic extraction, sentiment analysis, price predictions, hotel scoring….
•Techniques: Natural language processing, NLP micro understanding, clustering, time series analysis
Large Hospitality
Group
•Using deep learning to extract intelligence from trial discovery documents and legal research
•8 different deep learning models
•Scenarios: Natural language search, knowledge extraction, document relationships, research recommendations, strategy simulation
•Techniques: Convolutional neural networks, generative models, recurrent neural networks, natural language processing….
Legal Software
Platform Vendor
•Using deep learning to analyze cargo information and sensor data
•18 different deep learning models
•Scenarios: Car load predictions, part maintenance prediction, track video analysis
•Techniques: Convolutional neural networks, recurrent neural networks, transfer learning, predictive modeling, linear regressions….
International
Railway Company
•Using deep learning to simulate trading strategies
•11 different deep learning models
•Scenarios: Portfolio rebalancing, option pricing, daily stock selection, strategy selection
•Techniques: Reinforcement learning, transfer learning, predictive modeling
Quant Hedge Fund
Key Takeaways
• Implementing deep solutions at scale imposes new infrastructure
challenges
• Deep learning requires a new type of architecture
Deep Learning?
Deep Learning
• Deep learning is a subset of machine learning.
• Uses a hierarchy of multiple layers of nonlinear processing units for
feature extraction and transformation. Each successive layer uses the
output from the previous layer as input.
• Learns in supervised (e.g., classification) and/or unsupervised (e.g.,
pattern analysis) manners.
• Learns multiple levels of representations that correspond to different
levels of abstraction; the levels form a hierarchy of concepts.
Deep Learning Sub-Disciplines
Deep
Learning
Convolutional
Neural
Networks
Recurrent
Neural
Networks
Adversarial
Neural
Networks
Reinforcement
Learning
Generative
Models
Transfer
Learning
….
What Makes Deep Learning so Challenging?
Curse of Dimensionality
• Models with millions of nodes
Over/Under Fitting
• Models too tailored to the datasets
Interpretability
• Understanding complex network structures
Bias/Variance
• Preconceptions included in the datasets
Implementing Deep Learning in the Enterprise is
Brutally Hard
But not just because of the obvious reasons…
10 painful, non-trivial lessons we learned while
building deep learning solutions at scale…
Lesson #1: Data Scientists Make Horrible
Engineers…
Challenge
• Data scientists are great at experimentation
• Not so much at writing high quality code
• Experimentation deep learning frameworks don’t necessarily make great
production frameworks, ex: PyTorch vs. TensorFlow
A Possible Solution: Divide Data Science and
Engineering Teams
• Write notebooks and
experimentation
models
Data Science
Team
• Refactor or rewrite
models for production
environments
• Automate training and
optimization jobs
Engineering
Team • Deploy models
• Monitor, retrain, and
optimize models
DevOps Teams
Lesson #2: Notebooks Don’t Scale …
Wait, Notebooks Do Scale Stupid
Challenge
• Notebooks are ideal for model experimentation and testing
• Notebooks typically have performance challenges when executed at
scale
• Scaling Notebook environments can be challenging
• Parametrizing Notebook executions is far from trivial
A Possible Solution: Use Containers for
Running Production Deep Learning Workloads
Model Experimentation
Jupyter, Zeppelin
Scheduling Notebooks
Papermill
Netflix’s Meson
Running Complex
Workflows
Docker Containers
Kubernetes
Lesson #3: The Single Deep Learning
Framework Fallacy…
Challenge
• Enterprises like to standardize on a single deep learning framework
• Different teams have different technology preferences
• Providing a consistent deep learning platform across different deep
learning frameworks is no easy task
A Possible Solution: Provide a Consistent
Infrastructure Across Different Deep Learning
Runtimes
Infrastructure
Data Cleansing Feature Extraction Model Training ….
Runtime
Hyperparameter
Optimization
Retraining Model Monitoring …
Model Development
TensorFlow PyTorch Caffee2 …
Lesson #4: Training is a Continuous Task…
Challenge
• The No Free Lunch Theorem
• Trained models can perform poorly against new datasets
• New engineers and DevOps need to understand how to re-train existing
models
A Possible Solution: Automate Training Jobs
DataLake
Data Outcomes/Feature
Store
Training Job1
Training Job2
Training JobN
Lesson #5: Centralized Training Doesn’t
Scale…
Challenge
• Model training can be really resource intensive
• Training jobs take a long time to execute
• Data scientists love to embed the training logic as part of the model
Notebook
A Possible Solution: Follow a Distributed Training
Architecture and Automate Training Jobs
Trained
Models
Training
Jobs
Training
Server
Training
Job
Task1 Model1
Task2 Model2
TaskN ModelN
Lesson #6: Feature Extraction Can Become a
Reusability Nightmare…
Challenge
• Different models require the same features from a dataset
• Feature extraction jobs are computationally expensive
• Different teams create proprietary ways to capture and store feature
information
A Potential Solution: Build a Centralized
Feature Store
Dataset Preparation
Job1
Dataset Preparation
Job2
Dataset Preparation
JobN
Representation
Learning Task1
Representation
Learning Task1
Representation
Learning Task1
Feature
Store
Model 1
Model N
Lesson #7: Everyone Wants a Different
Version of the Same Model…
Challenge
• Different teams might want variations of an existing model
• The same model might be trained on different sections of the original
training set
• You might end up with thousands of versions of the original model
• Even the simplest models take a long time to implement
A Possible Solution: Using AutoML and
Hierarchical Partitions on the Training Dataset
Training
Dataset
Dataset
Section 1
AutoML
Model
Version 3
Dataset
Section 2
AutoML
Model
Version 3
Dataset
Section 3
AutoML
Model
Version 3
Model
Lesson #8: Cloud Heavens, On-Premise Hell…
Challenge
• Cloud deep learning platforms are far more sophisticated that their on-
premise equivalent
• Running deep learning workloads on-premise requires a complex
infrastructure
A Possible Solution: Consider Spark or Flink as
the On-Premise Runtime
Production
Experimentation/Development
Deploy
Lesson #9: Regularization, Optimizations are a
Must…
Challenge
• Deep learning models tend to vary their performance when using
different datasets
• The cost functions of different deep learning models changes when using
different datasets
A Possible Solution: Make Regularization and
Optimization Key Elements of the Lifecycle of a
Model
Model
Development
RegularizationOptimization
Lesson #10: Different Models Require
Different Execution Patterns…
Challenge
• Not all models can be executed via APIs
• Some models take a long time to run
• In some scenarios, different models need to be executed at the same
time based on a specific condition
Possible Solution: Enable On-Demand, Scheduled
and Pub-Sub Execution of Deep Learning Models
Scheduled Activation
Model Model Model
Pub-Sub Activation
Model Model Model
On-Demand Activation
Model Model Model
Model API
Gateway
Event
Gateway
Summary
• Deep learning theory doesn't quite work in real world scenarios
• Deep learning requires a new type of architecture
• Consider combining some of the patterns described in this
presentation into a single cohesive architecture for the
implementation of deep learning solutions
Thanks
jr@invectoriq.com
https://medium.com/@jrodthoughts
https://twitter.com/jrdothoughts

More Related Content

Similar to 10 Things I Wish I Dad Known Before Scaling Deep Learning Solutions

Deep learning with tensorflow
Deep learning with tensorflowDeep learning with tensorflow
Deep learning with tensorflowCharmi Chokshi
 
Deep Learning Made Easy with Deep Features
Deep Learning Made Easy with Deep FeaturesDeep Learning Made Easy with Deep Features
Deep Learning Made Easy with Deep FeaturesTuri, Inc.
 
Applied Machine Learning Course - Jodie Zhu (WeCloudData)
Applied Machine Learning Course - Jodie Zhu (WeCloudData)Applied Machine Learning Course - Jodie Zhu (WeCloudData)
Applied Machine Learning Course - Jodie Zhu (WeCloudData)WeCloudData
 
Deep learning introduction
Deep learning introductionDeep learning introduction
Deep learning introductionAdwait Bhave
 
Deep learning with keras
Deep learning with kerasDeep learning with keras
Deep learning with kerasMOHITKUMAR1379
 
DL4J at Workday Meetup
DL4J at Workday MeetupDL4J at Workday Meetup
DL4J at Workday MeetupDavid Kale
 
JRs presentation-few-shot-learning-overview @ AI4Media WP5 workshop
JRs presentation-few-shot-learning-overview @ AI4Media WP5 workshopJRs presentation-few-shot-learning-overview @ AI4Media WP5 workshop
JRs presentation-few-shot-learning-overview @ AI4Media WP5 workshopHannes Fassold
 
transferlearning.pptx
transferlearning.pptxtransferlearning.pptx
transferlearning.pptxAmit Kumar
 
Data Science Accelerator Program
Data Science Accelerator ProgramData Science Accelerator Program
Data Science Accelerator ProgramGoDataDriven
 
Deep Learning For Practitioners, lecture 2: Selecting the right applications...
Deep Learning For Practitioners,  lecture 2: Selecting the right applications...Deep Learning For Practitioners,  lecture 2: Selecting the right applications...
Deep Learning For Practitioners, lecture 2: Selecting the right applications...ananth
 
Self driving computers active learning workflows with human interpretable ve...
Self driving computers  active learning workflows with human interpretable ve...Self driving computers  active learning workflows with human interpretable ve...
Self driving computers active learning workflows with human interpretable ve...Adam Gibson
 
Deep Learning with CNTK
Deep Learning with CNTKDeep Learning with CNTK
Deep Learning with CNTKAshish Jaiman
 
Open source ml systems that need to be built
Open source ml systems that need to be builtOpen source ml systems that need to be built
Open source ml systems that need to be builtNikhil Garg
 
Deep learning and Apache Spark
Deep learning and Apache SparkDeep learning and Apache Spark
Deep learning and Apache SparkQuantUniversity
 
Enriching Solr with Deep Learning for a Question Answering System - Sanket Sh...
Enriching Solr with Deep Learning for a Question Answering System - Sanket Sh...Enriching Solr with Deep Learning for a Question Answering System - Sanket Sh...
Enriching Solr with Deep Learning for a Question Answering System - Sanket Sh...Lucidworks
 

Similar to 10 Things I Wish I Dad Known Before Scaling Deep Learning Solutions (20)

Deep learning with tensorflow
Deep learning with tensorflowDeep learning with tensorflow
Deep learning with tensorflow
 
Deep Learning Made Easy with Deep Features
Deep Learning Made Easy with Deep FeaturesDeep Learning Made Easy with Deep Features
Deep Learning Made Easy with Deep Features
 
tensorflow.pptx
tensorflow.pptxtensorflow.pptx
tensorflow.pptx
 
Deep learning for NLP
Deep learning for NLPDeep learning for NLP
Deep learning for NLP
 
Applied Machine Learning Course - Jodie Zhu (WeCloudData)
Applied Machine Learning Course - Jodie Zhu (WeCloudData)Applied Machine Learning Course - Jodie Zhu (WeCloudData)
Applied Machine Learning Course - Jodie Zhu (WeCloudData)
 
Deep learning introduction
Deep learning introductionDeep learning introduction
Deep learning introduction
 
Deep learning with keras
Deep learning with kerasDeep learning with keras
Deep learning with keras
 
DL4J at Workday Meetup
DL4J at Workday MeetupDL4J at Workday Meetup
DL4J at Workday Meetup
 
Kubeflow.pptx
Kubeflow.pptxKubeflow.pptx
Kubeflow.pptx
 
JRs presentation-few-shot-learning-overview @ AI4Media WP5 workshop
JRs presentation-few-shot-learning-overview @ AI4Media WP5 workshopJRs presentation-few-shot-learning-overview @ AI4Media WP5 workshop
JRs presentation-few-shot-learning-overview @ AI4Media WP5 workshop
 
transferlearning.pptx
transferlearning.pptxtransferlearning.pptx
transferlearning.pptx
 
Introduction to Design Patterns
Introduction to Design PatternsIntroduction to Design Patterns
Introduction to Design Patterns
 
Data Science Accelerator Program
Data Science Accelerator ProgramData Science Accelerator Program
Data Science Accelerator Program
 
Deep Learning For Practitioners, lecture 2: Selecting the right applications...
Deep Learning For Practitioners,  lecture 2: Selecting the right applications...Deep Learning For Practitioners,  lecture 2: Selecting the right applications...
Deep Learning For Practitioners, lecture 2: Selecting the right applications...
 
Self driving computers active learning workflows with human interpretable ve...
Self driving computers  active learning workflows with human interpretable ve...Self driving computers  active learning workflows with human interpretable ve...
Self driving computers active learning workflows with human interpretable ve...
 
Deep Learning with CNTK
Deep Learning with CNTKDeep Learning with CNTK
Deep Learning with CNTK
 
Open source ml systems that need to be built
Open source ml systems that need to be builtOpen source ml systems that need to be built
Open source ml systems that need to be built
 
Deep learning and Apache Spark
Deep learning and Apache SparkDeep learning and Apache Spark
Deep learning and Apache Spark
 
Deep Domain
Deep DomainDeep Domain
Deep Domain
 
Enriching Solr with Deep Learning for a Question Answering System - Sanket Sh...
Enriching Solr with Deep Learning for a Question Answering System - Sanket Sh...Enriching Solr with Deep Learning for a Question Answering System - Sanket Sh...
Enriching Solr with Deep Learning for a Question Answering System - Sanket Sh...
 

More from Jesus Rodriguez

The Emergence of DeFi Micro-Primitives
The Emergence of DeFi Micro-PrimitivesThe Emergence of DeFi Micro-Primitives
The Emergence of DeFi Micro-PrimitivesJesus Rodriguez
 
ChatGPT, Foundation Models and Web3.pptx
ChatGPT, Foundation Models and Web3.pptxChatGPT, Foundation Models and Web3.pptx
ChatGPT, Foundation Models and Web3.pptxJesus Rodriguez
 
DeFi Opportunities and Challenges in the Current Crypto Market
DeFi Opportunities and Challenges in the Current Crypto MarketDeFi Opportunities and Challenges in the Current Crypto Market
DeFi Opportunities and Challenges in the Current Crypto MarketJesus Rodriguez
 
The Polygon Blockchain by the Numbers
The Polygon Blockchain by the NumbersThe Polygon Blockchain by the Numbers
The Polygon Blockchain by the NumbersJesus Rodriguez
 
Social Analytics for Cryptocurrencies
Social Analytics for Cryptocurrencies Social Analytics for Cryptocurrencies
Social Analytics for Cryptocurrencies Jesus Rodriguez
 
DeFi Quant Yield-Generating Strategies
DeFi Quant Yield-Generating StrategiesDeFi Quant Yield-Generating Strategies
DeFi Quant Yield-Generating StrategiesJesus Rodriguez
 
High Frequency Trading and DeFi
High Frequency Trading and DeFiHigh Frequency Trading and DeFi
High Frequency Trading and DeFiJesus Rodriguez
 
Simple DeFi Analytics Any Crypto-Investor Should Know About
Simple DeFi Analytics Any Crypto-Investor Should Know About Simple DeFi Analytics Any Crypto-Investor Should Know About
Simple DeFi Analytics Any Crypto-Investor Should Know About Jesus Rodriguez
 
15 Minutes of DeFi Analytics
15 Minutes of DeFi Analytics15 Minutes of DeFi Analytics
15 Minutes of DeFi AnalyticsJesus Rodriguez
 
DeFi Trading Strategies: Opportunities and Challenges
DeFi Trading Strategies: Opportunities and ChallengesDeFi Trading Strategies: Opportunities and Challenges
DeFi Trading Strategies: Opportunities and ChallengesJesus Rodriguez
 
Practical Crypto Asset Predictions rev
Practical Crypto Asset Predictions revPractical Crypto Asset Predictions rev
Practical Crypto Asset Predictions revJesus Rodriguez
 
Better Technical Analysis with Blockchain Indicators
Better Technical Analysis with Blockchain IndicatorsBetter Technical Analysis with Blockchain Indicators
Better Technical Analysis with Blockchain IndicatorsJesus Rodriguez
 
Price Predictions for Cryptocurrencies
Price Predictions for CryptocurrenciesPrice Predictions for Cryptocurrencies
Price Predictions for CryptocurrenciesJesus Rodriguez
 
Fascinating Metrics and Analytics About Cryptocurrencies
Fascinating Metrics and Analytics About CryptocurrenciesFascinating Metrics and Analytics About Cryptocurrencies
Fascinating Metrics and Analytics About CryptocurrenciesJesus Rodriguez
 
Price PRedictions for Crypto-Assets Using Deep Learning
Price PRedictions for Crypto-Assets Using Deep LearningPrice PRedictions for Crypto-Assets Using Deep Learning
Price PRedictions for Crypto-Assets Using Deep LearningJesus Rodriguez
 
Demystifying Centralized Crypto Exchanges using Data Science
Demystifying Centralized Crypto Exchanges using Data ScienceDemystifying Centralized Crypto Exchanges using Data Science
Demystifying Centralized Crypto Exchanges using Data ScienceJesus Rodriguez
 
Crypto assets are a data science heaven rev
Crypto assets are a data science heaven revCrypto assets are a data science heaven rev
Crypto assets are a data science heaven revJesus Rodriguez
 
Fundamental Analysis for Crypto Assets
Fundamental Analysis for Crypto AssetsFundamental Analysis for Crypto Assets
Fundamental Analysis for Crypto AssetsJesus Rodriguez
 

More from Jesus Rodriguez (20)

The Emergence of DeFi Micro-Primitives
The Emergence of DeFi Micro-PrimitivesThe Emergence of DeFi Micro-Primitives
The Emergence of DeFi Micro-Primitives
 
ChatGPT, Foundation Models and Web3.pptx
ChatGPT, Foundation Models and Web3.pptxChatGPT, Foundation Models and Web3.pptx
ChatGPT, Foundation Models and Web3.pptx
 
DeFi Opportunities and Challenges in the Current Crypto Market
DeFi Opportunities and Challenges in the Current Crypto MarketDeFi Opportunities and Challenges in the Current Crypto Market
DeFi Opportunities and Challenges in the Current Crypto Market
 
MEV Deep Dive .pptx
MEV Deep Dive .pptxMEV Deep Dive .pptx
MEV Deep Dive .pptx
 
Quant in Crypto Land
Quant in Crypto LandQuant in Crypto Land
Quant in Crypto Land
 
The Polygon Blockchain by the Numbers
The Polygon Blockchain by the NumbersThe Polygon Blockchain by the Numbers
The Polygon Blockchain by the Numbers
 
Social Analytics for Cryptocurrencies
Social Analytics for Cryptocurrencies Social Analytics for Cryptocurrencies
Social Analytics for Cryptocurrencies
 
DeFi Quant Yield-Generating Strategies
DeFi Quant Yield-Generating StrategiesDeFi Quant Yield-Generating Strategies
DeFi Quant Yield-Generating Strategies
 
High Frequency Trading and DeFi
High Frequency Trading and DeFiHigh Frequency Trading and DeFi
High Frequency Trading and DeFi
 
Simple DeFi Analytics Any Crypto-Investor Should Know About
Simple DeFi Analytics Any Crypto-Investor Should Know About Simple DeFi Analytics Any Crypto-Investor Should Know About
Simple DeFi Analytics Any Crypto-Investor Should Know About
 
15 Minutes of DeFi Analytics
15 Minutes of DeFi Analytics15 Minutes of DeFi Analytics
15 Minutes of DeFi Analytics
 
DeFi Trading Strategies: Opportunities and Challenges
DeFi Trading Strategies: Opportunities and ChallengesDeFi Trading Strategies: Opportunities and Challenges
DeFi Trading Strategies: Opportunities and Challenges
 
Practical Crypto Asset Predictions rev
Practical Crypto Asset Predictions revPractical Crypto Asset Predictions rev
Practical Crypto Asset Predictions rev
 
Better Technical Analysis with Blockchain Indicators
Better Technical Analysis with Blockchain IndicatorsBetter Technical Analysis with Blockchain Indicators
Better Technical Analysis with Blockchain Indicators
 
Price Predictions for Cryptocurrencies
Price Predictions for CryptocurrenciesPrice Predictions for Cryptocurrencies
Price Predictions for Cryptocurrencies
 
Fascinating Metrics and Analytics About Cryptocurrencies
Fascinating Metrics and Analytics About CryptocurrenciesFascinating Metrics and Analytics About Cryptocurrencies
Fascinating Metrics and Analytics About Cryptocurrencies
 
Price PRedictions for Crypto-Assets Using Deep Learning
Price PRedictions for Crypto-Assets Using Deep LearningPrice PRedictions for Crypto-Assets Using Deep Learning
Price PRedictions for Crypto-Assets Using Deep Learning
 
Demystifying Centralized Crypto Exchanges using Data Science
Demystifying Centralized Crypto Exchanges using Data ScienceDemystifying Centralized Crypto Exchanges using Data Science
Demystifying Centralized Crypto Exchanges using Data Science
 
Crypto assets are a data science heaven rev
Crypto assets are a data science heaven revCrypto assets are a data science heaven rev
Crypto assets are a data science heaven rev
 
Fundamental Analysis for Crypto Assets
Fundamental Analysis for Crypto AssetsFundamental Analysis for Crypto Assets
Fundamental Analysis for Crypto Assets
 

Recently uploaded

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 

Recently uploaded (20)

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 

10 Things I Wish I Dad Known Before Scaling Deep Learning Solutions

  • 1. 10 Things I Wish I Had Known Before Scaling Deep Learning Solutions Invector Labs
  • 2. About Invector Labs • Platform for top-class computer science talent • Uses artificial intelligence to connect enterprises with top freelance talent around the world • Focused on deep tech • Artificial intelligence • Blockchain technologies • Internet of things • Cybersecurity • Advanced cloud computing • …. • http://invectorlabs.com
  • 3. Agenda • Realities of scaling deep learning solutions • 10 Lessons • Challenge • What we learned? • Solution
  • 4. Lessons from the Real World •Using deep learning to analyze reviews form over 40 travel websites •12 different deep learning models •Scenarios: topic extraction, sentiment analysis, price predictions, hotel scoring…. •Techniques: Natural language processing, NLP micro understanding, clustering, time series analysis Large Hospitality Group •Using deep learning to extract intelligence from trial discovery documents and legal research •8 different deep learning models •Scenarios: Natural language search, knowledge extraction, document relationships, research recommendations, strategy simulation •Techniques: Convolutional neural networks, generative models, recurrent neural networks, natural language processing…. Legal Software Platform Vendor •Using deep learning to analyze cargo information and sensor data •18 different deep learning models •Scenarios: Car load predictions, part maintenance prediction, track video analysis •Techniques: Convolutional neural networks, recurrent neural networks, transfer learning, predictive modeling, linear regressions…. International Railway Company •Using deep learning to simulate trading strategies •11 different deep learning models •Scenarios: Portfolio rebalancing, option pricing, daily stock selection, strategy selection •Techniques: Reinforcement learning, transfer learning, predictive modeling Quant Hedge Fund
  • 5. Key Takeaways • Implementing deep solutions at scale imposes new infrastructure challenges • Deep learning requires a new type of architecture
  • 7. Deep Learning • Deep learning is a subset of machine learning. • Uses a hierarchy of multiple layers of nonlinear processing units for feature extraction and transformation. Each successive layer uses the output from the previous layer as input. • Learns in supervised (e.g., classification) and/or unsupervised (e.g., pattern analysis) manners. • Learns multiple levels of representations that correspond to different levels of abstraction; the levels form a hierarchy of concepts.
  • 9. What Makes Deep Learning so Challenging? Curse of Dimensionality • Models with millions of nodes Over/Under Fitting • Models too tailored to the datasets Interpretability • Understanding complex network structures Bias/Variance • Preconceptions included in the datasets
  • 10. Implementing Deep Learning in the Enterprise is Brutally Hard
  • 11. But not just because of the obvious reasons…
  • 12. 10 painful, non-trivial lessons we learned while building deep learning solutions at scale…
  • 13. Lesson #1: Data Scientists Make Horrible Engineers…
  • 14. Challenge • Data scientists are great at experimentation • Not so much at writing high quality code • Experimentation deep learning frameworks don’t necessarily make great production frameworks, ex: PyTorch vs. TensorFlow
  • 15. A Possible Solution: Divide Data Science and Engineering Teams • Write notebooks and experimentation models Data Science Team • Refactor or rewrite models for production environments • Automate training and optimization jobs Engineering Team • Deploy models • Monitor, retrain, and optimize models DevOps Teams
  • 16. Lesson #2: Notebooks Don’t Scale … Wait, Notebooks Do Scale Stupid
  • 17. Challenge • Notebooks are ideal for model experimentation and testing • Notebooks typically have performance challenges when executed at scale • Scaling Notebook environments can be challenging • Parametrizing Notebook executions is far from trivial
  • 18. A Possible Solution: Use Containers for Running Production Deep Learning Workloads Model Experimentation Jupyter, Zeppelin Scheduling Notebooks Papermill Netflix’s Meson Running Complex Workflows Docker Containers Kubernetes
  • 19. Lesson #3: The Single Deep Learning Framework Fallacy…
  • 20. Challenge • Enterprises like to standardize on a single deep learning framework • Different teams have different technology preferences • Providing a consistent deep learning platform across different deep learning frameworks is no easy task
  • 21. A Possible Solution: Provide a Consistent Infrastructure Across Different Deep Learning Runtimes Infrastructure Data Cleansing Feature Extraction Model Training …. Runtime Hyperparameter Optimization Retraining Model Monitoring … Model Development TensorFlow PyTorch Caffee2 …
  • 22. Lesson #4: Training is a Continuous Task…
  • 23. Challenge • The No Free Lunch Theorem • Trained models can perform poorly against new datasets • New engineers and DevOps need to understand how to re-train existing models
  • 24. A Possible Solution: Automate Training Jobs DataLake Data Outcomes/Feature Store Training Job1 Training Job2 Training JobN
  • 25. Lesson #5: Centralized Training Doesn’t Scale…
  • 26. Challenge • Model training can be really resource intensive • Training jobs take a long time to execute • Data scientists love to embed the training logic as part of the model Notebook
  • 27. A Possible Solution: Follow a Distributed Training Architecture and Automate Training Jobs Trained Models Training Jobs Training Server Training Job Task1 Model1 Task2 Model2 TaskN ModelN
  • 28. Lesson #6: Feature Extraction Can Become a Reusability Nightmare…
  • 29. Challenge • Different models require the same features from a dataset • Feature extraction jobs are computationally expensive • Different teams create proprietary ways to capture and store feature information
  • 30. A Potential Solution: Build a Centralized Feature Store Dataset Preparation Job1 Dataset Preparation Job2 Dataset Preparation JobN Representation Learning Task1 Representation Learning Task1 Representation Learning Task1 Feature Store Model 1 Model N
  • 31. Lesson #7: Everyone Wants a Different Version of the Same Model…
  • 32. Challenge • Different teams might want variations of an existing model • The same model might be trained on different sections of the original training set • You might end up with thousands of versions of the original model • Even the simplest models take a long time to implement
  • 33. A Possible Solution: Using AutoML and Hierarchical Partitions on the Training Dataset Training Dataset Dataset Section 1 AutoML Model Version 3 Dataset Section 2 AutoML Model Version 3 Dataset Section 3 AutoML Model Version 3 Model
  • 34. Lesson #8: Cloud Heavens, On-Premise Hell…
  • 35. Challenge • Cloud deep learning platforms are far more sophisticated that their on- premise equivalent • Running deep learning workloads on-premise requires a complex infrastructure
  • 36. A Possible Solution: Consider Spark or Flink as the On-Premise Runtime Production Experimentation/Development Deploy
  • 37. Lesson #9: Regularization, Optimizations are a Must…
  • 38. Challenge • Deep learning models tend to vary their performance when using different datasets • The cost functions of different deep learning models changes when using different datasets
  • 39. A Possible Solution: Make Regularization and Optimization Key Elements of the Lifecycle of a Model Model Development RegularizationOptimization
  • 40. Lesson #10: Different Models Require Different Execution Patterns…
  • 41. Challenge • Not all models can be executed via APIs • Some models take a long time to run • In some scenarios, different models need to be executed at the same time based on a specific condition
  • 42. Possible Solution: Enable On-Demand, Scheduled and Pub-Sub Execution of Deep Learning Models Scheduled Activation Model Model Model Pub-Sub Activation Model Model Model On-Demand Activation Model Model Model Model API Gateway Event Gateway
  • 43. Summary • Deep learning theory doesn't quite work in real world scenarios • Deep learning requires a new type of architecture • Consider combining some of the patterns described in this presentation into a single cohesive architecture for the implementation of deep learning solutions