SlideShare ist ein Scribd-Unternehmen logo
1 von 37
End-to-end deep
learning deployment
with ONNX
—
Nick Pentreath
Principal Engineer
@MLnick
About
IBM Developer / © 2020 IBM Corporation
–@MLnick on Twitter & Github
–Principal Engineer, IBM CODAIT (Center
for Open-Source Data & AI Technologies)
–Machine Learning & AI
–Apache Spark committer & PMC
–Author of Machine Learning with Spark
–Various conferences & meetups
2
CODAIT
Improving the Enterprise AI Lifecycle in Open Source
Center for Open Source
Data & AI Technologies
IBM Developer / © 2020 IBM Corporation 3
CODAIT aims to make AI solutions dramatically
easier to create, deploy, and manage in the
enterprise.
We contribute to and advocate for the open-source
technologies that are foundational to IBM’s AI
offerings.
30+ open-source developers!
The Machine Learning
Workflow
IBM Developer / © 2020 IBM Corporation 4
Perception
IBM Developer / © 2020 IBM Corporation 5
In reality the
workflow spans teams …
IBM Developer / © 2020 IBM Corporation 6
… and tools …
IBM Developer / © 2020 IBM Corporation 7
… and is a small (but
critical!) piece of the puzzle
*Source: Hidden Technical Debt in Machine Learning Systems
IBM Developer / © 2020 IBM Corporation 8
Machine Learning
Deployment
IBM Developer / © 2020 IBM Corporation 9
What, Where, How?
–What are you deploying?
• What is a “model”
–Where are you deploying?
• Target environment (cloud, browser,
edge)
• Batch, streaming, real-time?
–How are you deploying?
• Devops / serving frameworks
We will talk mostly about the what
IBM Developer / © 2020 IBM Corporation 10
What is a “model”?
IBM Developer / © 2020 IBM Corporation 11
Deep Learning doesn’t need
feature engineering or data
processing …
IBM Developer / © 2020 IBM Corporation 12
right?
Deep learning
pipeline?
IBM Developer / © 2020 IBM Corporation 13
Source: https://ai.googleblog.com/2016/03/train-your-own-image-classifier-with.html
beagle: 0.82
Input image Inference Prediction
Deep learning
pipeline!
IBM Developer / © 2020 IBM Corporation 14
beagle: 0.82
basset: 0.09
bluetick: 0.07
...
Input image Image pre-processing Prediction
Decode image
Resize
Normalization
Convert types / format
Inference Post-processing
[0.2, 0.3, … ]
(label, prob)
Sort
Label map
PIL, OpenCV, tf.image,
…
Custom
Python
* Logos trademarks of their respective projects
Image pre-processing
IBM Developer / © 2020 IBM Corporation 15
Decode image
Resize
Normalization
Convert types / format
vs
Color mode cat: 0.45
beagle: 0.34
Decoding lib
RGB BGR
PIL vs OpenCV vs tf.image vs skimage
libJPEG vs OpenCV
INTEGER_FAST vs
INTEGER_ACCURATE
Data layout
NCHW vs NHWC
Image pre-processing
IBM Developer / © 2020 IBM Corporation 16
Decode image
Resize
Normalization
Convert types / format
Operation order
Normalize INT pixels (128) Convert Float32
Convert Float32 Normalize float (0.5)
Inference post-
processing
IBM Developer / © 2020 IBM Corporation 17
Convert to numpy array
[0.2, 0.3, … ]
(label, prob)
Sort
Label map
Custom loading label mapping / vocab / …
TF SavedModel (assets)
Keras decode_predictions
Custom code
Custom code
Pipelines, not Models
–Deploying just the model is not
enough
–Entire pipeline must be deployed
• Data transforms
• Feature extraction & pre-processing
• DL / ML model
• Prediction transformation
–Even ETL is part of the pipeline!
–Pipelines in frameworks
• scikit-learn
• Spark ML pipelines
• TensorFlow Transform
• pipeliner (R)
IBM Developer / © 2020 IBM Corporation 18
Challenges
February 12, 2020 / © 2020 IBM Corporation
–Formats
• Each framework does things differently
• Proprietary formats: lock-in, not portable
–Custom solutions and extensions
–Manage and bridge:
• Languages
• Frameworks
• Dependencies / versions
–Performance can vary across these
dimensions
–Friction between teams
• Data scientists & researchers
• Production
• Business
* Logos trademarks of their respective projects
19
Containers for ML
Deployment
IBM Developer / © 2020 IBM Corporation 20
Containers are “The Solution”
… right?
–But …
• What goes in the container is still the
most important factor
• Performance can be highly variable
across language, framework, version
• Requires devops knowledge, CI /
deployment pipelines, good practices
• Does not solve the issue of
standardization
• Formats
• APIs exposed
• A serving framework is still required on
top
–Container-based deployment has
significant benefits
• Repeatability
• Ease of configuration
• Separation of concerns – focus on what,
not how
• Allow data scientists & researchers to use
their language / framework of choice
• Container frameworks take care of
(certain) monitoring, fault tolerance, HA,
etc.
IBM Developer / © 2020 IBM Corporation 21
Open Standards for
Model Serialization &
Deployment
IBM Developer / © 2020 IBM Corporation 22
Why a standard?
Standard
Format
Execution
Optimization
Tooling
(Viz, analysis, …)
Single stack
IBM Developer / © 2020 IBM Corporation 23
Why an Open Standard?
–Open-source vs open standard
–Open source (license) is only one
aspect
• OSS licensing allows free use,
modification
• Inspect the code etc
• … but may not have any control
–Open governance is critical
• Avoid concentration of control (typically
by large companies, vendors)
• Visibility of development processes,
strategic planning, roadmaps
–However there are downsides
• Standard needs wide adoption and critical
mass to succeed
• A standard can move slowly in terms of
new features, fixes and enhancements
• Design by committee
• Keeping up with pace of framework
development
IBM Developer / © 2020 IBM Corporation 24
Open Neural Network Exchange (ONNX)
–Established 2017 by Facebook &
Microsoft
–Protobuf for serialization format and
type specification
–Describes
• computation graph (inputs, outputs,
operators) - DAG
• values (weights)
–Serialized graph is self-contained
IBM Developer / © 2020 IBM Corporation 25
–Focused on Deep Learning / tensor
operations
–Baked into PyTorch from 1.0.0 /
Caffe2 as the serialization &
interchange format
ONNX Graphs
IBM Developer / © 2020 IBM Corporation 26
matmult/Mul (op#0)
input0 X
input1 Y
output0 Z
X
Z
Y
Source: http://onnx.ai/sklearn-onnx/auto_examples/plot_pipeline.html
graph {
node {
input: "X"
input: "Y"
output: "Z"
name: "matmult"
op_type: "Mul"
}
input {
name: "X"
type { ... }
}
output {
name: "Z"
type { ... }
}
}
ONNX Graphs
Link: https://github.com/lutzroeder/Netron#models
SqueezeNet
Computation Graph
Visualization
IBM Developer / © 2020 IBM Corporation 27
Deep Learning Framework Support
–Framework converters
• PyTorch / Caffe2 (baked in)
• TensorFlow
• Keras
• Apple CoreML
• MXNet
• MS Cognitive Toolkit
• … many more
IBM Developer / © 2020 IBM Corporation 28
https://onnx.ai/supported-tools.html
ONNX-ML
–Provides support for (parts of)
“traditional” machine learning
• Additional types: sequences, maps
• Operators
• Vectorizers (numeric & string data)
• One hot encoding, label encoding
• Scalers (normalization, scaling)
• Models (linear, SVM,
TreeEnsemble)
• …
https://github.com/onnx/onnx/blob/master/docs/Operators-ml.md
IBM Developer / © 2020 IBM Corporation 29
ONNX-ML
–Exporter support
• Scikit-learn – 60+
• LightGBM
• XGBoost
• Apache Spark ML – 25+
• Keras – all layers + TF custom layers
• Libsvm
• Apple CoreML
https://github.com/onnx/onnxmltools/
http://onnx.ai/sklearn-onnx/index.html
https://github.com/onnx/keras-onnxIBM Developer / © 2020 IBM Corporation 30
ONNX Ecosystem
Other compliant
runtimes
Single stack
IBM Developer / © 2020 IBM Corporation 31
Network visualization
Converters ONNX Spec
ONNX
Model Zoo
ONNX Open Governance
–ONNX Standard joined Linux
Foundation AI, Nov 2019
• Multiple vendors
• High level steering committee
• Special Interest Groups (SIGs)
–Architecture & Infra
–Converters
–Operators
–Models & Tutorials
• Working groups – e.g. training, pipelines
https://lfai.foundation/press-release/2019/11/14/lf-ai-welcomes-onnx/
IBM Developer / © 2020 IBM Corporation 32
–Other ecosystem components not part
of LFAI (as yet)
• Converter projects
• ONNX Runtime
• Other runtimes
ONNX Missing Pieces
–ONNX
• Operator / converter coverage
– e.g. TensorFlow coverage
• Image processing
– Support for basic resize, crop
– No support for reading image directly (like
tf.image.decode_jpeg)
• String processing
• Comprehensive benchmarks
IBM Developer / © 2020 IBM Corporation 33
–ONNX-ML
• Types
– datetime
• Operators
– String processing / NLP – e.g. tokenization
– Hashing
– Clustering models
• Specific exporters
– Apache Spark ML – python only
– Very basic tokenization in sklearn
– No support for Keras tokenizer
• Combining frameworks
– Still ad-hoc, requires custom code
Summary
ONNX
• Linux Foundation AI
open governance
• Active project; growing
rapidly
• Performant - deep
learning ops, GPU support
• ONNX-ML provides some
support for ”traditional” ML
and feature processing
• Still relatively new
• Difficult to keep up with
framework evolution
• Still work required for
feature processing and
other data types (strings,
datetime, etc)
• Limited image & text pre-
processing
IBM Developer / © 2020 IBM Corporation 34
Conclusion
–However there are risks
• ONNX still relatively young
• Operator / framework coverage
• Limitations of a standard
–Open standard for serialization and
deployment of deep learning pipelines
• True portability across languages,
frameworks, runtimes and versions
• Execution environment independent of
the producer
• One execution stack
–Solves a significant pain point for the
deployment of DL pipelines in a fully
open manner
Get involved - it’s open source, open governance!
https://onnx.ai/IBM Developer / © 2020 IBM Corporation 35
Thank you
IBM Developer / © 2020 IBM Corporation
codait.org
twitter.com/MLnick
github.com/MLnick
developer.ibm.com
36
IBM Developer / © 2020 IBM Corporation 37

Weitere ähnliche Inhalte

Was ist angesagt?

“Accelerating Newer ML Models Using the Qualcomm AI Stack,” a Presentation fr...
“Accelerating Newer ML Models Using the Qualcomm AI Stack,” a Presentation fr...“Accelerating Newer ML Models Using the Qualcomm AI Stack,” a Presentation fr...
“Accelerating Newer ML Models Using the Qualcomm AI Stack,” a Presentation fr...Edge AI and Vision Alliance
 
Introduction to Deep Learning (NVIDIA)
Introduction to Deep Learning (NVIDIA)Introduction to Deep Learning (NVIDIA)
Introduction to Deep Learning (NVIDIA)Rakuten Group, Inc.
 
ONNX and Edge Deployments
ONNX and Edge DeploymentsONNX and Edge Deployments
ONNX and Edge DeploymentsApache MXNet
 
Approximate nearest neighbor methods and vector models – NYC ML meetup
Approximate nearest neighbor methods and vector models – NYC ML meetupApproximate nearest neighbor methods and vector models – NYC ML meetup
Approximate nearest neighbor methods and vector models – NYC ML meetupErik Bernhardsson
 
Fine tune and deploy Hugging Face NLP models
Fine tune and deploy Hugging Face NLP modelsFine tune and deploy Hugging Face NLP models
Fine tune and deploy Hugging Face NLP modelsOVHcloud
 
LLMs_talk_March23.pdf
LLMs_talk_March23.pdfLLMs_talk_March23.pdf
LLMs_talk_March23.pdfChaoYang81
 
Accelerated Training of Transformer Models
Accelerated Training of Transformer ModelsAccelerated Training of Transformer Models
Accelerated Training of Transformer ModelsDatabricks
 
Hardware Acceleration for Machine Learning
Hardware Acceleration for Machine LearningHardware Acceleration for Machine Learning
Hardware Acceleration for Machine LearningCastLabKAIST
 
LLaMA 2.pptx
LLaMA 2.pptxLLaMA 2.pptx
LLaMA 2.pptxRkRahul16
 
Learning to Rank with Neural Networks
Learning to Rank with Neural NetworksLearning to Rank with Neural Networks
Learning to Rank with Neural NetworksBhaskar Mitra
 
And then there were ... Large Language Models
And then there were ... Large Language ModelsAnd then there were ... Large Language Models
And then there were ... Large Language ModelsLeon Dohmen
 
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
BERT: Pre-training of Deep Bidirectional Transformers for Language UnderstandingBERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
BERT: Pre-training of Deep Bidirectional Transformers for Language Understandinggohyunwoong
 
Fine tuning large LMs
Fine tuning large LMsFine tuning large LMs
Fine tuning large LMsSylvainGugger
 
Stable Diffusion path
Stable Diffusion pathStable Diffusion path
Stable Diffusion pathVitaly Bondar
 
Transformers In Vision From Zero to Hero (DLI).pptx
Transformers In Vision From Zero to Hero (DLI).pptxTransformers In Vision From Zero to Hero (DLI).pptx
Transformers In Vision From Zero to Hero (DLI).pptxDeep Learning Italia
 
Building a Pipeline for State-of-the-Art Natural Language Processing Using Hu...
Building a Pipeline for State-of-the-Art Natural Language Processing Using Hu...Building a Pipeline for State-of-the-Art Natural Language Processing Using Hu...
Building a Pipeline for State-of-the-Art Natural Language Processing Using Hu...Databricks
 
Keras Tutorial For Beginners | Creating Deep Learning Models Using Keras In P...
Keras Tutorial For Beginners | Creating Deep Learning Models Using Keras In P...Keras Tutorial For Beginners | Creating Deep Learning Models Using Keras In P...
Keras Tutorial For Beginners | Creating Deep Learning Models Using Keras In P...Edureka!
 
Managing the Complete Machine Learning Lifecycle with MLflow
Managing the Complete Machine Learning Lifecycle with MLflowManaging the Complete Machine Learning Lifecycle with MLflow
Managing the Complete Machine Learning Lifecycle with MLflowDatabricks
 

Was ist angesagt? (20)

“Accelerating Newer ML Models Using the Qualcomm AI Stack,” a Presentation fr...
“Accelerating Newer ML Models Using the Qualcomm AI Stack,” a Presentation fr...“Accelerating Newer ML Models Using the Qualcomm AI Stack,” a Presentation fr...
“Accelerating Newer ML Models Using the Qualcomm AI Stack,” a Presentation fr...
 
Introduction to Deep Learning (NVIDIA)
Introduction to Deep Learning (NVIDIA)Introduction to Deep Learning (NVIDIA)
Introduction to Deep Learning (NVIDIA)
 
ONNX and Edge Deployments
ONNX and Edge DeploymentsONNX and Edge Deployments
ONNX and Edge Deployments
 
Approximate nearest neighbor methods and vector models – NYC ML meetup
Approximate nearest neighbor methods and vector models – NYC ML meetupApproximate nearest neighbor methods and vector models – NYC ML meetup
Approximate nearest neighbor methods and vector models – NYC ML meetup
 
Fine tune and deploy Hugging Face NLP models
Fine tune and deploy Hugging Face NLP modelsFine tune and deploy Hugging Face NLP models
Fine tune and deploy Hugging Face NLP models
 
BERT introduction
BERT introductionBERT introduction
BERT introduction
 
LLMs_talk_March23.pdf
LLMs_talk_March23.pdfLLMs_talk_March23.pdf
LLMs_talk_March23.pdf
 
Accelerated Training of Transformer Models
Accelerated Training of Transformer ModelsAccelerated Training of Transformer Models
Accelerated Training of Transformer Models
 
Hardware Acceleration for Machine Learning
Hardware Acceleration for Machine LearningHardware Acceleration for Machine Learning
Hardware Acceleration for Machine Learning
 
LLaMA 2.pptx
LLaMA 2.pptxLLaMA 2.pptx
LLaMA 2.pptx
 
Learning to Rank with Neural Networks
Learning to Rank with Neural NetworksLearning to Rank with Neural Networks
Learning to Rank with Neural Networks
 
And then there were ... Large Language Models
And then there were ... Large Language ModelsAnd then there were ... Large Language Models
And then there were ... Large Language Models
 
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
BERT: Pre-training of Deep Bidirectional Transformers for Language UnderstandingBERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
 
Fine tuning large LMs
Fine tuning large LMsFine tuning large LMs
Fine tuning large LMs
 
Stable Diffusion path
Stable Diffusion pathStable Diffusion path
Stable Diffusion path
 
Intro to LLMs
Intro to LLMsIntro to LLMs
Intro to LLMs
 
Transformers In Vision From Zero to Hero (DLI).pptx
Transformers In Vision From Zero to Hero (DLI).pptxTransformers In Vision From Zero to Hero (DLI).pptx
Transformers In Vision From Zero to Hero (DLI).pptx
 
Building a Pipeline for State-of-the-Art Natural Language Processing Using Hu...
Building a Pipeline for State-of-the-Art Natural Language Processing Using Hu...Building a Pipeline for State-of-the-Art Natural Language Processing Using Hu...
Building a Pipeline for State-of-the-Art Natural Language Processing Using Hu...
 
Keras Tutorial For Beginners | Creating Deep Learning Models Using Keras In P...
Keras Tutorial For Beginners | Creating Deep Learning Models Using Keras In P...Keras Tutorial For Beginners | Creating Deep Learning Models Using Keras In P...
Keras Tutorial For Beginners | Creating Deep Learning Models Using Keras In P...
 
Managing the Complete Machine Learning Lifecycle with MLflow
Managing the Complete Machine Learning Lifecycle with MLflowManaging the Complete Machine Learning Lifecycle with MLflow
Managing the Complete Machine Learning Lifecycle with MLflow
 

Ähnlich wie ONNX deep learning deployment

Deploying End-to-End Deep Learning Pipelines with ONNX
Deploying End-to-End Deep Learning Pipelines with ONNXDeploying End-to-End Deep Learning Pipelines with ONNX
Deploying End-to-End Deep Learning Pipelines with ONNXDatabricks
 
Continuous Deployment for Deep Learning
Continuous Deployment for Deep LearningContinuous Deployment for Deep Learning
Continuous Deployment for Deep LearningDatabricks
 
Toward Hybrid Cloud Serverless Transparency with Lithops Framework
Toward Hybrid Cloud Serverless Transparency with Lithops FrameworkToward Hybrid Cloud Serverless Transparency with Lithops Framework
Toward Hybrid Cloud Serverless Transparency with Lithops FrameworkLibbySchulze
 
Ai pipelines powered by jupyter notebooks
Ai pipelines powered by jupyter notebooksAi pipelines powered by jupyter notebooks
Ai pipelines powered by jupyter notebooksLuciano Resende
 
Open Source AI - News and examples
Open Source AI - News and examplesOpen Source AI - News and examples
Open Source AI - News and examplesLuciano Resende
 
Scaling up deep learning by scaling down
Scaling up deep learning by scaling downScaling up deep learning by scaling down
Scaling up deep learning by scaling downNick Pentreath
 
Scaling up Deep Learning by Scaling Down
Scaling up Deep Learning by Scaling DownScaling up Deep Learning by Scaling Down
Scaling up Deep Learning by Scaling DownDatabricks
 
Decision Optimization - CPLEX Optimization Studio - Product Overview(2).PPTX
Decision Optimization - CPLEX Optimization Studio - Product Overview(2).PPTXDecision Optimization - CPLEX Optimization Studio - Product Overview(2).PPTX
Decision Optimization - CPLEX Optimization Studio - Product Overview(2).PPTXSanjayKPrasad2
 
IBM Developer Model Asset eXchange
IBM Developer Model Asset eXchangeIBM Developer Model Asset eXchange
IBM Developer Model Asset eXchangeNick Pentreath
 
Ml also helps generic compiler ?
Ml also helps generic compiler ?Ml also helps generic compiler ?
Ml also helps generic compiler ?Ryo Takahashi
 
F1270089476650
F1270089476650F1270089476650
F1270089476650Anil Kumar
 
The NRB Group mainframe day 2021 - New Programming Languages on Z - Frank Van...
The NRB Group mainframe day 2021 - New Programming Languages on Z - Frank Van...The NRB Group mainframe day 2021 - New Programming Languages on Z - Frank Van...
The NRB Group mainframe day 2021 - New Programming Languages on Z - Frank Van...NRB
 
Open, Secure & Transparent AI Pipelines
Open, Secure & Transparent AI PipelinesOpen, Secure & Transparent AI Pipelines
Open, Secure & Transparent AI PipelinesNick Pentreath
 
Inteligencia artificial, open source e IBM Call for Code
Inteligencia artificial, open source e IBM Call for CodeInteligencia artificial, open source e IBM Call for Code
Inteligencia artificial, open source e IBM Call for CodeLuciano Resende
 
Pragmatic Model Driven Development using openArchitectureWare
Pragmatic Model Driven Development using openArchitectureWarePragmatic Model Driven Development using openArchitectureWare
Pragmatic Model Driven Development using openArchitectureWareMichael Vorburger
 
pythonOCC PDE2009 presentation
pythonOCC PDE2009 presentationpythonOCC PDE2009 presentation
pythonOCC PDE2009 presentationThomas Paviot
 
2013 09-02 senzations-bimschas-part3-wiselib
2013 09-02 senzations-bimschas-part3-wiselib2013 09-02 senzations-bimschas-part3-wiselib
2013 09-02 senzations-bimschas-part3-wiselibDaniel Bimschas
 
Oleksii Moskalenko "Continuous Delivery of ML Pipelines to Production"
Oleksii Moskalenko "Continuous Delivery of ML Pipelines to Production"Oleksii Moskalenko "Continuous Delivery of ML Pipelines to Production"
Oleksii Moskalenko "Continuous Delivery of ML Pipelines to Production"Fwdays
 
Understand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java ApplicationsUnderstand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java ApplicationsC4Media
 
Webinar: Começando seus trabalhos com Machine Learning utilizando ferramentas...
Webinar: Começando seus trabalhos com Machine Learning utilizando ferramentas...Webinar: Começando seus trabalhos com Machine Learning utilizando ferramentas...
Webinar: Começando seus trabalhos com Machine Learning utilizando ferramentas...Embarcados
 

Ähnlich wie ONNX deep learning deployment (20)

Deploying End-to-End Deep Learning Pipelines with ONNX
Deploying End-to-End Deep Learning Pipelines with ONNXDeploying End-to-End Deep Learning Pipelines with ONNX
Deploying End-to-End Deep Learning Pipelines with ONNX
 
Continuous Deployment for Deep Learning
Continuous Deployment for Deep LearningContinuous Deployment for Deep Learning
Continuous Deployment for Deep Learning
 
Toward Hybrid Cloud Serverless Transparency with Lithops Framework
Toward Hybrid Cloud Serverless Transparency with Lithops FrameworkToward Hybrid Cloud Serverless Transparency with Lithops Framework
Toward Hybrid Cloud Serverless Transparency with Lithops Framework
 
Ai pipelines powered by jupyter notebooks
Ai pipelines powered by jupyter notebooksAi pipelines powered by jupyter notebooks
Ai pipelines powered by jupyter notebooks
 
Open Source AI - News and examples
Open Source AI - News and examplesOpen Source AI - News and examples
Open Source AI - News and examples
 
Scaling up deep learning by scaling down
Scaling up deep learning by scaling downScaling up deep learning by scaling down
Scaling up deep learning by scaling down
 
Scaling up Deep Learning by Scaling Down
Scaling up Deep Learning by Scaling DownScaling up Deep Learning by Scaling Down
Scaling up Deep Learning by Scaling Down
 
Decision Optimization - CPLEX Optimization Studio - Product Overview(2).PPTX
Decision Optimization - CPLEX Optimization Studio - Product Overview(2).PPTXDecision Optimization - CPLEX Optimization Studio - Product Overview(2).PPTX
Decision Optimization - CPLEX Optimization Studio - Product Overview(2).PPTX
 
IBM Developer Model Asset eXchange
IBM Developer Model Asset eXchangeIBM Developer Model Asset eXchange
IBM Developer Model Asset eXchange
 
Ml also helps generic compiler ?
Ml also helps generic compiler ?Ml also helps generic compiler ?
Ml also helps generic compiler ?
 
F1270089476650
F1270089476650F1270089476650
F1270089476650
 
The NRB Group mainframe day 2021 - New Programming Languages on Z - Frank Van...
The NRB Group mainframe day 2021 - New Programming Languages on Z - Frank Van...The NRB Group mainframe day 2021 - New Programming Languages on Z - Frank Van...
The NRB Group mainframe day 2021 - New Programming Languages on Z - Frank Van...
 
Open, Secure & Transparent AI Pipelines
Open, Secure & Transparent AI PipelinesOpen, Secure & Transparent AI Pipelines
Open, Secure & Transparent AI Pipelines
 
Inteligencia artificial, open source e IBM Call for Code
Inteligencia artificial, open source e IBM Call for CodeInteligencia artificial, open source e IBM Call for Code
Inteligencia artificial, open source e IBM Call for Code
 
Pragmatic Model Driven Development using openArchitectureWare
Pragmatic Model Driven Development using openArchitectureWarePragmatic Model Driven Development using openArchitectureWare
Pragmatic Model Driven Development using openArchitectureWare
 
pythonOCC PDE2009 presentation
pythonOCC PDE2009 presentationpythonOCC PDE2009 presentation
pythonOCC PDE2009 presentation
 
2013 09-02 senzations-bimschas-part3-wiselib
2013 09-02 senzations-bimschas-part3-wiselib2013 09-02 senzations-bimschas-part3-wiselib
2013 09-02 senzations-bimschas-part3-wiselib
 
Oleksii Moskalenko "Continuous Delivery of ML Pipelines to Production"
Oleksii Moskalenko "Continuous Delivery of ML Pipelines to Production"Oleksii Moskalenko "Continuous Delivery of ML Pipelines to Production"
Oleksii Moskalenko "Continuous Delivery of ML Pipelines to Production"
 
Understand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java ApplicationsUnderstand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java Applications
 
Webinar: Começando seus trabalhos com Machine Learning utilizando ferramentas...
Webinar: Começando seus trabalhos com Machine Learning utilizando ferramentas...Webinar: Começando seus trabalhos com Machine Learning utilizando ferramentas...
Webinar: Começando seus trabalhos com Machine Learning utilizando ferramentas...
 

Mehr von Nick Pentreath

Notebook-based AI Pipelines with Elyra and Kubeflow
Notebook-based AI Pipelines with Elyra and KubeflowNotebook-based AI Pipelines with Elyra and Kubeflow
Notebook-based AI Pipelines with Elyra and KubeflowNick Pentreath
 
AI and Spark - IBM Community AI Day
AI and Spark - IBM Community AI DayAI and Spark - IBM Community AI Day
AI and Spark - IBM Community AI DayNick Pentreath
 
IBM Developer Model Asset eXchange - Deep Learning for Everyone
IBM Developer Model Asset eXchange - Deep Learning for EveryoneIBM Developer Model Asset eXchange - Deep Learning for Everyone
IBM Developer Model Asset eXchange - Deep Learning for EveryoneNick Pentreath
 
Search and Recommendations: 3 Sides of the Same Coin
Search and Recommendations: 3 Sides of the Same CoinSearch and Recommendations: 3 Sides of the Same Coin
Search and Recommendations: 3 Sides of the Same CoinNick Pentreath
 
Deep Learning for Recommender Systems
Deep Learning for Recommender SystemsDeep Learning for Recommender Systems
Deep Learning for Recommender SystemsNick Pentreath
 
Productionizing Spark ML Pipelines with the Portable Format for Analytics
Productionizing Spark ML Pipelines with the Portable Format for AnalyticsProductionizing Spark ML Pipelines with the Portable Format for Analytics
Productionizing Spark ML Pipelines with the Portable Format for AnalyticsNick Pentreath
 
RNNs for Recommendations and Personalization
RNNs for Recommendations and PersonalizationRNNs for Recommendations and Personalization
RNNs for Recommendations and PersonalizationNick Pentreath
 

Mehr von Nick Pentreath (7)

Notebook-based AI Pipelines with Elyra and Kubeflow
Notebook-based AI Pipelines with Elyra and KubeflowNotebook-based AI Pipelines with Elyra and Kubeflow
Notebook-based AI Pipelines with Elyra and Kubeflow
 
AI and Spark - IBM Community AI Day
AI and Spark - IBM Community AI DayAI and Spark - IBM Community AI Day
AI and Spark - IBM Community AI Day
 
IBM Developer Model Asset eXchange - Deep Learning for Everyone
IBM Developer Model Asset eXchange - Deep Learning for EveryoneIBM Developer Model Asset eXchange - Deep Learning for Everyone
IBM Developer Model Asset eXchange - Deep Learning for Everyone
 
Search and Recommendations: 3 Sides of the Same Coin
Search and Recommendations: 3 Sides of the Same CoinSearch and Recommendations: 3 Sides of the Same Coin
Search and Recommendations: 3 Sides of the Same Coin
 
Deep Learning for Recommender Systems
Deep Learning for Recommender SystemsDeep Learning for Recommender Systems
Deep Learning for Recommender Systems
 
Productionizing Spark ML Pipelines with the Portable Format for Analytics
Productionizing Spark ML Pipelines with the Portable Format for AnalyticsProductionizing Spark ML Pipelines with the Portable Format for Analytics
Productionizing Spark ML Pipelines with the Portable Format for Analytics
 
RNNs for Recommendations and Personalization
RNNs for Recommendations and PersonalizationRNNs for Recommendations and Personalization
RNNs for Recommendations and Personalization
 

Kürzlich hochgeladen

(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfadriantubila
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxolyaivanovalion
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxolyaivanovalion
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfMarinCaroMartnezBerg
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxolyaivanovalion
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxJohnnyPlasten
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxolyaivanovalion
 
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...shivangimorya083
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxolyaivanovalion
 
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 Analysismanisha194592
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...Pooja Nehwal
 
Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...shambhavirathore45
 
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779Delhi Call girls
 
Zuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptxZuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptxolyaivanovalion
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 

Kürzlich hochgeladen (20)

(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptx
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptx
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptx
 
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
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptx
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptx
 
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptx
 
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
 
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
 
Sampling (random) method and Non random.ppt
Sampling (random) method and Non random.pptSampling (random) method and Non random.ppt
Sampling (random) method and Non random.ppt
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
 
Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...
 
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
 
Zuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptxZuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptx
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 

ONNX deep learning deployment

  • 1. End-to-end deep learning deployment with ONNX — Nick Pentreath Principal Engineer @MLnick
  • 2. About IBM Developer / © 2020 IBM Corporation –@MLnick on Twitter & Github –Principal Engineer, IBM CODAIT (Center for Open-Source Data & AI Technologies) –Machine Learning & AI –Apache Spark committer & PMC –Author of Machine Learning with Spark –Various conferences & meetups 2
  • 3. CODAIT Improving the Enterprise AI Lifecycle in Open Source Center for Open Source Data & AI Technologies IBM Developer / © 2020 IBM Corporation 3 CODAIT aims to make AI solutions dramatically easier to create, deploy, and manage in the enterprise. We contribute to and advocate for the open-source technologies that are foundational to IBM’s AI offerings. 30+ open-source developers!
  • 4. The Machine Learning Workflow IBM Developer / © 2020 IBM Corporation 4
  • 5. Perception IBM Developer / © 2020 IBM Corporation 5
  • 6. In reality the workflow spans teams … IBM Developer / © 2020 IBM Corporation 6
  • 7. … and tools … IBM Developer / © 2020 IBM Corporation 7
  • 8. … and is a small (but critical!) piece of the puzzle *Source: Hidden Technical Debt in Machine Learning Systems IBM Developer / © 2020 IBM Corporation 8
  • 9. Machine Learning Deployment IBM Developer / © 2020 IBM Corporation 9
  • 10. What, Where, How? –What are you deploying? • What is a “model” –Where are you deploying? • Target environment (cloud, browser, edge) • Batch, streaming, real-time? –How are you deploying? • Devops / serving frameworks We will talk mostly about the what IBM Developer / © 2020 IBM Corporation 10
  • 11. What is a “model”? IBM Developer / © 2020 IBM Corporation 11
  • 12. Deep Learning doesn’t need feature engineering or data processing … IBM Developer / © 2020 IBM Corporation 12 right?
  • 13. Deep learning pipeline? IBM Developer / © 2020 IBM Corporation 13 Source: https://ai.googleblog.com/2016/03/train-your-own-image-classifier-with.html beagle: 0.82 Input image Inference Prediction
  • 14. Deep learning pipeline! IBM Developer / © 2020 IBM Corporation 14 beagle: 0.82 basset: 0.09 bluetick: 0.07 ... Input image Image pre-processing Prediction Decode image Resize Normalization Convert types / format Inference Post-processing [0.2, 0.3, … ] (label, prob) Sort Label map PIL, OpenCV, tf.image, … Custom Python * Logos trademarks of their respective projects
  • 15. Image pre-processing IBM Developer / © 2020 IBM Corporation 15 Decode image Resize Normalization Convert types / format vs Color mode cat: 0.45 beagle: 0.34 Decoding lib RGB BGR PIL vs OpenCV vs tf.image vs skimage libJPEG vs OpenCV INTEGER_FAST vs INTEGER_ACCURATE Data layout NCHW vs NHWC
  • 16. Image pre-processing IBM Developer / © 2020 IBM Corporation 16 Decode image Resize Normalization Convert types / format Operation order Normalize INT pixels (128) Convert Float32 Convert Float32 Normalize float (0.5)
  • 17. Inference post- processing IBM Developer / © 2020 IBM Corporation 17 Convert to numpy array [0.2, 0.3, … ] (label, prob) Sort Label map Custom loading label mapping / vocab / … TF SavedModel (assets) Keras decode_predictions Custom code Custom code
  • 18. Pipelines, not Models –Deploying just the model is not enough –Entire pipeline must be deployed • Data transforms • Feature extraction & pre-processing • DL / ML model • Prediction transformation –Even ETL is part of the pipeline! –Pipelines in frameworks • scikit-learn • Spark ML pipelines • TensorFlow Transform • pipeliner (R) IBM Developer / © 2020 IBM Corporation 18
  • 19. Challenges February 12, 2020 / © 2020 IBM Corporation –Formats • Each framework does things differently • Proprietary formats: lock-in, not portable –Custom solutions and extensions –Manage and bridge: • Languages • Frameworks • Dependencies / versions –Performance can vary across these dimensions –Friction between teams • Data scientists & researchers • Production • Business * Logos trademarks of their respective projects 19
  • 20. Containers for ML Deployment IBM Developer / © 2020 IBM Corporation 20
  • 21. Containers are “The Solution” … right? –But … • What goes in the container is still the most important factor • Performance can be highly variable across language, framework, version • Requires devops knowledge, CI / deployment pipelines, good practices • Does not solve the issue of standardization • Formats • APIs exposed • A serving framework is still required on top –Container-based deployment has significant benefits • Repeatability • Ease of configuration • Separation of concerns – focus on what, not how • Allow data scientists & researchers to use their language / framework of choice • Container frameworks take care of (certain) monitoring, fault tolerance, HA, etc. IBM Developer / © 2020 IBM Corporation 21
  • 22. Open Standards for Model Serialization & Deployment IBM Developer / © 2020 IBM Corporation 22
  • 23. Why a standard? Standard Format Execution Optimization Tooling (Viz, analysis, …) Single stack IBM Developer / © 2020 IBM Corporation 23
  • 24. Why an Open Standard? –Open-source vs open standard –Open source (license) is only one aspect • OSS licensing allows free use, modification • Inspect the code etc • … but may not have any control –Open governance is critical • Avoid concentration of control (typically by large companies, vendors) • Visibility of development processes, strategic planning, roadmaps –However there are downsides • Standard needs wide adoption and critical mass to succeed • A standard can move slowly in terms of new features, fixes and enhancements • Design by committee • Keeping up with pace of framework development IBM Developer / © 2020 IBM Corporation 24
  • 25. Open Neural Network Exchange (ONNX) –Established 2017 by Facebook & Microsoft –Protobuf for serialization format and type specification –Describes • computation graph (inputs, outputs, operators) - DAG • values (weights) –Serialized graph is self-contained IBM Developer / © 2020 IBM Corporation 25 –Focused on Deep Learning / tensor operations –Baked into PyTorch from 1.0.0 / Caffe2 as the serialization & interchange format
  • 26. ONNX Graphs IBM Developer / © 2020 IBM Corporation 26 matmult/Mul (op#0) input0 X input1 Y output0 Z X Z Y Source: http://onnx.ai/sklearn-onnx/auto_examples/plot_pipeline.html graph { node { input: "X" input: "Y" output: "Z" name: "matmult" op_type: "Mul" } input { name: "X" type { ... } } output { name: "Z" type { ... } } }
  • 27. ONNX Graphs Link: https://github.com/lutzroeder/Netron#models SqueezeNet Computation Graph Visualization IBM Developer / © 2020 IBM Corporation 27
  • 28. Deep Learning Framework Support –Framework converters • PyTorch / Caffe2 (baked in) • TensorFlow • Keras • Apple CoreML • MXNet • MS Cognitive Toolkit • … many more IBM Developer / © 2020 IBM Corporation 28 https://onnx.ai/supported-tools.html
  • 29. ONNX-ML –Provides support for (parts of) “traditional” machine learning • Additional types: sequences, maps • Operators • Vectorizers (numeric & string data) • One hot encoding, label encoding • Scalers (normalization, scaling) • Models (linear, SVM, TreeEnsemble) • … https://github.com/onnx/onnx/blob/master/docs/Operators-ml.md IBM Developer / © 2020 IBM Corporation 29
  • 30. ONNX-ML –Exporter support • Scikit-learn – 60+ • LightGBM • XGBoost • Apache Spark ML – 25+ • Keras – all layers + TF custom layers • Libsvm • Apple CoreML https://github.com/onnx/onnxmltools/ http://onnx.ai/sklearn-onnx/index.html https://github.com/onnx/keras-onnxIBM Developer / © 2020 IBM Corporation 30
  • 31. ONNX Ecosystem Other compliant runtimes Single stack IBM Developer / © 2020 IBM Corporation 31 Network visualization Converters ONNX Spec ONNX Model Zoo
  • 32. ONNX Open Governance –ONNX Standard joined Linux Foundation AI, Nov 2019 • Multiple vendors • High level steering committee • Special Interest Groups (SIGs) –Architecture & Infra –Converters –Operators –Models & Tutorials • Working groups – e.g. training, pipelines https://lfai.foundation/press-release/2019/11/14/lf-ai-welcomes-onnx/ IBM Developer / © 2020 IBM Corporation 32 –Other ecosystem components not part of LFAI (as yet) • Converter projects • ONNX Runtime • Other runtimes
  • 33. ONNX Missing Pieces –ONNX • Operator / converter coverage – e.g. TensorFlow coverage • Image processing – Support for basic resize, crop – No support for reading image directly (like tf.image.decode_jpeg) • String processing • Comprehensive benchmarks IBM Developer / © 2020 IBM Corporation 33 –ONNX-ML • Types – datetime • Operators – String processing / NLP – e.g. tokenization – Hashing – Clustering models • Specific exporters – Apache Spark ML – python only – Very basic tokenization in sklearn – No support for Keras tokenizer • Combining frameworks – Still ad-hoc, requires custom code
  • 34. Summary ONNX • Linux Foundation AI open governance • Active project; growing rapidly • Performant - deep learning ops, GPU support • ONNX-ML provides some support for ”traditional” ML and feature processing • Still relatively new • Difficult to keep up with framework evolution • Still work required for feature processing and other data types (strings, datetime, etc) • Limited image & text pre- processing IBM Developer / © 2020 IBM Corporation 34
  • 35. Conclusion –However there are risks • ONNX still relatively young • Operator / framework coverage • Limitations of a standard –Open standard for serialization and deployment of deep learning pipelines • True portability across languages, frameworks, runtimes and versions • Execution environment independent of the producer • One execution stack –Solves a significant pain point for the deployment of DL pipelines in a fully open manner Get involved - it’s open source, open governance! https://onnx.ai/IBM Developer / © 2020 IBM Corporation 35
  • 36. Thank you IBM Developer / © 2020 IBM Corporation codait.org twitter.com/MLnick github.com/MLnick developer.ibm.com 36
  • 37. IBM Developer / © 2020 IBM Corporation 37

Hinweis der Redaktion

  1. Data scientists & researchers – latest & greatest Production – stability, control, minimize changes, performance Business – metrics, business impact, product must always work!
  2. Separation of concerns Portability of models Ability to build a single, optimized stack of components for: Model execution Model analysis, visualization Monitoring