SlideShare a Scribd company logo
1 of 51
Download to read offline
Model Serving
27 May 2021
Andre Mesarovic
Sr. Resident Solutions Architect at
Databricks
Agenda
• MLflow model serving
• How to score models with MLflow
○ Offline scoring with Spark
○ Online scoring with MLflow model server
• Custom model deployment and scoring
• Databricks model server
Prediction overview
Offline Prediction
● High throughput
● Bulk predictions
● Predict with Spark/Databricks
● Batch Prediction
● Structured Streaming
Prediction
Online Prediction
● Low latency
● Individual predictions
● Real-time model serving
● MLflow scoring server
● MLflow deployment plugin
● Serving outside MLflow
● Databricks model serving
Vocabulary - Synonyms
Model Serving
● Model serving
● Model scoring
● Model prediction
● Model inference
● Model deployment
Prediction Types
● Offline == batch prediction
○ Spark batch prediction
○ Spark streaming prediction
● Online == real-time prediction
MLflow Model Serving Ecosystem
Offline Scoring
• Spark is ideally suited for offline scoring
• Distributed scoring with Spark
• Can use either Spark batch or structured streaming
• Use MLflow UDF (Python or SQL) to parallelize scoring for
single-node frameworks such as scikit-learn
• Create UDF model using Pyfunc flavor
• Load model from MLflow Model Registry
MLflow Offline Scoring Example
Score with native flavor
model = mlflow.sklearn.load_model(model_uri)
predictions = model.predict(data)
Score with Python UDF
model_uri = "models:/sklearn-wine/production"
Model URI
model = mlflow.pyfunc.load_model(model_uri)
predictions = model.predict(data)
Score with Pyfunc flavor
udf = mlflow.pyfunc.spark_udf(spark, model_uri)
predictions = data.withColumn("prediction", udf(*data.columns))
Score with SQL UDF
udf = mlflow.pyfunc.spark_udf(spark, model_uri)
spark.udf.register("predict", udf)
%sql select *, predict(*) as prediction from my_data
Online Scoring
• Score models outside of Spark
• Low-latency scoring one record at a time with immediate
feedback
• Variety of real-time deployment options:
○ REST API - web servers - self-managed or as containers in cloud providers
○ Embedded in browsers, .e.g TensorFlow Lite
○ Edge devices: mobile phones, sensors, routers, etc.
○ Hardware accelerators - GPU, NVIDIA, Intel
Options to serve real-time models
• Embed model in application code
• Model deployed as a service
• Model published as data
• Martin Fowler’s Continuous Delivery for Machine Learning
MLflow Model Server
• Cornerstone of different MLflow deployment targets
• Web server that exposes a standard REST API:
○ Input: CSV, JSON (pandas-split or pandas-records formats) or Tensor
(JSON)
○ Output: JSON list of predictions
• Implementation: Python Flask or Java Jetty server (only
MLeap)
• MLflow CLI builds a server with embedded model
• See Serving the Model and Built-In Deployment Tools
MLflow Model Server deployment options
• Local web server
• SageMaker docker container
• Azure ML docker container
• Generic docker container
• Custom deployment plugin targets
○ TorchServe, RedisAi, Ray or Algorithmia
MLflow Model Server container types
Python Server
Model and its ML
framework libraries
embedded in Flask
server. Only for non-
Spark ML models.
Python Server + Spark
Flask server delegates
scoring to Spark
server. Only for Spark
ML models.
Java MLeap Server
Model and MLeap
runtime are embedded
in Jetty server. Only
for Spark ML models.
No Spark runtime.
MLflow Model Server container types
Launch Local MLflow Model Server
mlflow models serve --model-uri models:/sklearn-iris/production --port 5001
Launch server
Launch local server
Score with CSV format
curl http://localhost:5001/invocations 
-H "Content-Type:text/csv" 
-d '
sepal_length,sepal_width,petal_length,petal_width
5.1,3.5,1.4,0.2
4.9,3.0,1.4,0.2'
Launch server
Request
[0, 0]
Launch server
Response
Score with JSON split-oriented format
curl http://localhost:5001/invocations 
-H "Content-Type:application/json" 
-d ' {
"columns": ["sepal_length", "sepal_width", "petal_length", "petal_width"],
"data": [
[ 5.1, 3.5, 1.4, 0.2 ],
[ 4.9, 3.0, 1.4, 0.2 ] ] }'
Launch server
Request
[0, 0]
Launch server
Response
Score with JSON record-oriented format
curl http://localhost:5001/invocations 
-H "Content-Type:application/json; format=pandas-records" 
-d '[
{ "sepal_length": 5.1, "sepal_width": 3.5, "petal_length": 1.4, "petal_width": 0.2 },
{ "sepal_length": 4.9, "sepal_width": 3.0, "petal_length": 1.4, "petal_width": 0.2 } ]'
Launch server
Request
[0, 0]
Launch server
Response
Score with JSON Tensor
● Tensor Input Now Supported in MLflow - Databricks blog
- 2021-03-18
● Request will be cast to Numpy arrays. This format is
specified using a Content-Type request header value of
application/json and the instances or inputs key in the
request body dictionary
● Content-type is application/json - 2 request formats will
be inferred
● See Deploy MLflow models - MLflow doc
● TFX Serving request format - TensorFlow doc
Score with JSON Tensor - numpy/tensor
curl http://127.0.0.1:5000/invocations -H 'Content-Type: application/json' -d '{
"instances": [
{"a": "s1", "b": 1, "c": [1, 2, 3]},
{"a": "s2", "b": 2, "c": [4, 5, 6]},
{"a": "s3", "b": 3, "c": [7, 8, 9]}
]
}'
Launch server
TensorFlow serving "instances" format
curl http://127.0.0.1:5000/invocations -H 'Content-Type: application/json' -d
'{
"inputs": {
"a": ["s1", "s2", "s3"],
"b": [1, 2, 3]
}'
Launch server
TensorFlow serving "inputs" format
MLflow SageMaker and Azure ML containers
• Two types of containers are deployed to cloud providers
○ Python container - Flask web server process with embedded model
○ SparkML container - Flask web server process and Spark process
• SageMaker container
○ Most versatile container type
○ Can run in local mode on laptop as regular docker container
Python container
• Flask web server
• Flask server runs behind gunicorn to allow concurrent
requests
• Serialized model (e.g. sklearn or Keras/TF) is embedded inside
web server and wrapped by Pyfunc
• Server leverages Pyfunc flavor to make generic predictions
SparkML container
• Two processes:
○ Flask web server
○ Spark server - OSS Spark - no Databricks
• Web server delegates scoring to Spark server
MLflow SageMaker container deployment
• CLI:
○ mlflow sagemaker build-and-push-container
○ mlflow sagemaker deploy
○ mlflow sagemaker run-local
• API: mlflow.sagemaker API
• Deploy a model on Amazon SageMaker
mlflow sagemaker build-and-push-container --build --container my-container
mlflow sagemaker deploy --app-name wine-quality 
--model-uri models:/wine-quality/production 
--image-url my-image-url 
--region us-west-2 --mode replace
Launch server
Launch container on SageMaker
Launch container on SageMaker
mlflow sagemaker build-and-push-container --build --no-push 
--container my-container
mlflow sagemaker run-local 
--model-uri models:/wine-quality/production 
--port 5051 --image my-container
Launch server
Launch local container
Deploy MLflow SageMaker container
MLflow AzureML container deployment
• Deploy to Azure Kubernetes Service (AKS) or Azure Container
Instances (ACI)
• CLI - mlflow azureml build-image
• API - mlflow.azureml.build-image
• Deploy a python_function model on Microsoft Azure ML
model_image, azure_model = mlflow.azureml.build_image(
model_uri="models:/sklearn_wine",
workspace="my_workspace",
model_name="sklearn_wine",
image_name="sklearn_wine_image",
description="Sklearn Wine Quality",
synchronous=True)
Deploy MLflow Azure ML container
MLeap
• Non-Spark serialization format for Spark models
• Advantage is ability to score Spark model without overhead of
Spark
• Faster than scoring Spark ML models with Spark
• Problem is stability, maturity and lack of dedicated
commercial support
End-to-end ML Pipeline Example with MLflow
See mlflow-examples - e2e-ml-pipeline
MLflow Deployment Plugins
• MLflow Deployment Plugins - Deploy model to custom serving
platform
• Current deployment plugins:
○ mlflow-torchserve
○ mlflow-redisai
○ mlflow-algorithmia
○ mlflow-ray-serve
MLflow Deployment Plugin Examples
Ray
mlflow deployments create -t torchserve ---name DEPLOYMENT_NAME -m <model uri> 
-C 'MODEL_FILE=<model file path>' -C 'HANDLER=<handler file path>'
TorchServe
mlflow deployments create -t redisai --name <rediskey> -m <model uri> 
-C <config option>
RedisAI
mlflow deployments create -t ray-serve --name <deployment name> -m <model uri> 
-C num_replicas=<number of replicas>
Algorithmia
mlflow deployments create -t algorithmia --name mlflow_sklearn_demo 
-m mlruns/0/<run-id>/artifacts/model
• MLflow PyTorch integration released in MLflow 1.12.0 (Nov.
2020)
• Integrates with PyTorch Lightning, TorchScript and
TorchServe
• Features:
○ Autologging with PyTorch Lightning
○ Translate to TorchScript model format for Python-free optimized scoring
○ Deploy MLflow models to TorchServe
MLflow + PyTorch = 🧡
MLflow + PyTorch = 🧡
MLflow TorchServe Resources
• PyTorch and MLflow Integration Announcement - 2020-11-12
• MLflow 1.12 Features Extended PyTorch Integration - 2012-11-
13
• MLflow and PyTorch — Where Cutting Edge AI meets MLOps -
medium - pytorch - 2020-11-12
• https://github.com/mlflow/mlflow-torchserve
MLflow RedisAI Resources
• https://github.com/RedisAI/mlflow-redisai
• All you need is PyTorch, MLflow, RedisAI and a cup of mocha
latte - medium - 2020-08-28
• Taking Deep Learning to Production with MLflow & RedisAI -
video - 30:16 - Sherin Thomas (RedisAI) - 2020-08-30
• PyPI mlflow-redisai
MLflow Ray Resources
• github.com/ray-project/mlflow-ray-serve
○ mlflow_example.py - test_mlflow_plugin.py
• Ray & MLflow: Taking Distributed Machine Learning
Applications to Production blog
○ Databricks blog - 2021-02-03
○ Ray blog - 2021-01-13
• Using MLflow with Tune - Ray docs
• PyPI mlflow-ray-serve
MLflow Algorithmia Resources
• MLFlow Integrations - Development Center - Algorithmia
• https://github.com/algorithmiaio/mlflow-algorithmia
• Algorithmia and MLflow: Integrating open-source tooling with
enterprise MLOps - Algorithmia blog - 2021-04-15
• pip install mlflow-algorithmia
• MLflow Integration from Azure ML and Algorithmia - video - 1:03:12 -
DAIS-2021 -2021-04-22
• Algorithmia and MLflow: Integrating open-source tooling with
enterprise MLOps - video - 11:19 - 2021-04-01
MLflow and TensorFlow Serving Custom
Deployment
• Example how to deploy models to a custom deployment target
• MLflow deployment plugin has not yet been developed
• Deployment builds a standard TensorFlow Serving docker
container with a MLflow model from Model Registry
• https://github.com/amesar/mlflow-
tools/tree/master/mlflow_tools/tensorflow_serving
Keras/TensorFlow Model Formats
• SavedModel format
○ TensorFlow standard format is default in Keras TF 2.x
○ Supported by TensorFlow Serving
○ As of MLflow 1.15.0 SavedModel is the default MLflow
format
• HD5 format
○ Default in Keras TF 1.x but is legacy in Keras TF 2.x
○ Not supported by TensorFlow Serving
and
Serving
Serving
Current Legacy pre-MLflow 1.15.0
TensorFlow Serving Example
docker run -t --rm --publish 8501 
--volume /opt/mlflow/mlruns/1/f48dafd70be044298f71488b0ae10df4/artifacts/tensorflow-
model:/models/keras_wine
--env MODEL_NAME=keras_wine 
tensorflow/serving
Launch server
Launch server in Docker container
curl -d '{"instances": [12.8, 0.03, 0.48, 0.98, 6.2, 29, 1.2, 0.4, 75 ] }' 
-X POST http://localhost:8501/v1/models/keras_wine:predict
Launch server
Request
{ "predictions": [[-0.70597136]] }
Launch server
Response
MLflow Keras/TensorFlow Run Models Example
MLflow Flavors - Managed Models
● Model flavors
○ tensorflow-model - standard SavedModel format
(saved_model.pb)
○ onnx-model
● Can be served as Pyfunc models
MLflow Unmanaged Models
● Models
○ tensorflow-model - Standard TF SavedModel format
○ tensorflow-lite-model
○ tensorflow.js model
● Load as raw artifacts and then serve manually
● Sample code: wine_train.py and wine_predict.py
ONNX - Open Neural Network Exchange
• Interoperable model format supported by:
○ MSFT, Facebook, AWS, Nvidia, Intel, etc.
• Train once, deploy anywhere (in theory) - depends on the
robustness of ML framework conversion
• Save MLflow model as ONNX flavor
• Deploy ONNX model in standard MLflow scoring server
• ONNX runtime is embedded in MLflow Python model server
Model Serving on Databricks
Model Serving
Turnkey serving
solution to expose
models as REST
endpoints
new
Reports
Applications
...
REST
Endpoint
Tracking
Record and query
experiments: code,
metrics, parameters,
artifacts, models
Models
General format
that standardizes
deployment options
Logged
Model
Model Registry
Centralized and
collaborative
model lifecycle
management
Staging Production Archived
Data Scientists Deployment Engineers
Current Databricks Model Serving - Public Preview
• HTTP endpoint publicly exposed using Databricks
authentication
• One node cluster is automatically provisioned
• Can select instance type
• Limited production capability - for light loads and testing
• Hosts all active versions of a model
• Can score from UI or via HTTP (curl, Python Requests)
Databricks Production-grade Model Serving
• Production-grade serving is on the product roadmap
• Spin up a multi-node cluster
• Model monitoring, model drift detection and metrics
• Log prediction requests and responses
• Low latency, high availability and scalable
• GPU support
Databricks Model Serving Launch
Databricks Model Scoring
Score with curl
curl 
https:/my_workspace.acme.com/my_model/Production/invocations 
-H "Content-Type:application/json" 
-d ' {
"columns": ["sepal_length", "sepal_width", "petal_length", "petal_width"],
"data": [
[ 5.1, 3.5, 1.4, 0.2 ],
[ 4.9, 3.0, 1.4, 0.2 ] ] }'
Launch server
Request
[0, 0]
Launch server
Response
Databricks Model Serving Resources
• Blog posts
○ Quickly Deploy, Test, and Manage ML Models as REST Endpoints with
MLflow Model Serving on Databricks - 2020-11-02
○ Announcing MLflow Model Serving on Databricks - 2020-06-25
• Documentation
○ MLflow Model Serving on Databricks
Feedback
Your feedback is important to us.
Don’t forget to rate and review the sessions.
Thank You
Happy model serving!

More Related Content

What's hot

Productionzing ML Model Using MLflow Model Serving
Productionzing ML Model Using MLflow Model ServingProductionzing ML Model Using MLflow Model Serving
Productionzing ML Model Using MLflow Model ServingDatabricks
 
Using MLOps to Bring ML to Production/The Promise of MLOps
Using MLOps to Bring ML to Production/The Promise of MLOpsUsing MLOps to Bring ML to Production/The Promise of MLOps
Using MLOps to Bring ML to Production/The Promise of MLOpsWeaveworks
 
Kubecon 2023 EU - KServe - The State and Future of Cloud-Native Model Serving
Kubecon 2023 EU - KServe - The State and Future of Cloud-Native Model ServingKubecon 2023 EU - KServe - The State and Future of Cloud-Native Model Serving
Kubecon 2023 EU - KServe - The State and Future of Cloud-Native Model ServingTheofilos Papapanagiotou
 
Simplifying Model Management with MLflow
Simplifying Model Management with MLflowSimplifying Model Management with MLflow
Simplifying Model Management with MLflowDatabricks
 
MLOps with Azure DevOps
MLOps with Azure DevOpsMLOps with Azure DevOps
MLOps with Azure DevOpsMarco Parenzan
 
Introducing Kubeflow (w. Special Guests Tensorflow and Apache Spark)
Introducing Kubeflow (w. Special Guests Tensorflow and Apache Spark)Introducing Kubeflow (w. Special Guests Tensorflow and Apache Spark)
Introducing Kubeflow (w. Special Guests Tensorflow and Apache Spark)DataWorks Summit
 
MLOps by Sasha Rosenbaum
MLOps by Sasha RosenbaumMLOps by Sasha Rosenbaum
MLOps by Sasha RosenbaumSasha Rosenbaum
 
Mlflow with databricks
Mlflow with databricksMlflow with databricks
Mlflow with databricksLiangjun Jiang
 
Seamless MLOps with Seldon and MLflow
Seamless MLOps with Seldon and MLflowSeamless MLOps with Seldon and MLflow
Seamless MLOps with Seldon and MLflowDatabricks
 
End to end Machine Learning using Kubeflow - Build, Train, Deploy and Manage
End to end Machine Learning using Kubeflow - Build, Train, Deploy and ManageEnd to end Machine Learning using Kubeflow - Build, Train, Deploy and Manage
End to end Machine Learning using Kubeflow - Build, Train, Deploy and ManageAnimesh Singh
 
MLOps Virtual Event | Building Machine Learning Platforms for the Full Lifecycle
MLOps Virtual Event | Building Machine Learning Platforms for the Full LifecycleMLOps Virtual Event | Building Machine Learning Platforms for the Full Lifecycle
MLOps Virtual Event | Building Machine Learning Platforms for the Full LifecycleDatabricks
 
MLFlow: Platform for Complete Machine Learning Lifecycle
MLFlow: Platform for Complete Machine Learning Lifecycle MLFlow: Platform for Complete Machine Learning Lifecycle
MLFlow: Platform for Complete Machine Learning Lifecycle Databricks
 
How to Utilize MLflow and Kubernetes to Build an Enterprise ML Platform
How to Utilize MLflow and Kubernetes to Build an Enterprise ML PlatformHow to Utilize MLflow and Kubernetes to Build an Enterprise ML Platform
How to Utilize MLflow and Kubernetes to Build an Enterprise ML PlatformDatabricks
 
Pyspark Tutorial | Introduction to Apache Spark with Python | PySpark Trainin...
Pyspark Tutorial | Introduction to Apache Spark with Python | PySpark Trainin...Pyspark Tutorial | Introduction to Apache Spark with Python | PySpark Trainin...
Pyspark Tutorial | Introduction to Apache Spark with Python | PySpark Trainin...Edureka!
 
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요Jo Hoon
 
MLflow: A Platform for Production Machine Learning
MLflow: A Platform for Production Machine LearningMLflow: A Platform for Production Machine Learning
MLflow: A Platform for Production Machine LearningMatei Zaharia
 
Redis + Apache Spark = Swiss Army Knife Meets Kitchen Sink
Redis + Apache Spark = Swiss Army Knife Meets Kitchen SinkRedis + Apache Spark = Swiss Army Knife Meets Kitchen Sink
Redis + Apache Spark = Swiss Army Knife Meets Kitchen SinkDatabricks
 
Vector databases and neural search
Vector databases and neural searchVector databases and neural search
Vector databases and neural searchDmitry Kan
 
Advanced MLflow: Multi-Step Workflows, Hyperparameter Tuning and Integrating ...
Advanced MLflow: Multi-Step Workflows, Hyperparameter Tuning and Integrating ...Advanced MLflow: Multi-Step Workflows, Hyperparameter Tuning and Integrating ...
Advanced MLflow: Multi-Step Workflows, Hyperparameter Tuning and Integrating ...Databricks
 

What's hot (20)

Productionzing ML Model Using MLflow Model Serving
Productionzing ML Model Using MLflow Model ServingProductionzing ML Model Using MLflow Model Serving
Productionzing ML Model Using MLflow Model Serving
 
Using MLOps to Bring ML to Production/The Promise of MLOps
Using MLOps to Bring ML to Production/The Promise of MLOpsUsing MLOps to Bring ML to Production/The Promise of MLOps
Using MLOps to Bring ML to Production/The Promise of MLOps
 
MLOps in action
MLOps in actionMLOps in action
MLOps in action
 
Kubecon 2023 EU - KServe - The State and Future of Cloud-Native Model Serving
Kubecon 2023 EU - KServe - The State and Future of Cloud-Native Model ServingKubecon 2023 EU - KServe - The State and Future of Cloud-Native Model Serving
Kubecon 2023 EU - KServe - The State and Future of Cloud-Native Model Serving
 
Simplifying Model Management with MLflow
Simplifying Model Management with MLflowSimplifying Model Management with MLflow
Simplifying Model Management with MLflow
 
MLOps with Azure DevOps
MLOps with Azure DevOpsMLOps with Azure DevOps
MLOps with Azure DevOps
 
Introducing Kubeflow (w. Special Guests Tensorflow and Apache Spark)
Introducing Kubeflow (w. Special Guests Tensorflow and Apache Spark)Introducing Kubeflow (w. Special Guests Tensorflow and Apache Spark)
Introducing Kubeflow (w. Special Guests Tensorflow and Apache Spark)
 
MLOps by Sasha Rosenbaum
MLOps by Sasha RosenbaumMLOps by Sasha Rosenbaum
MLOps by Sasha Rosenbaum
 
Mlflow with databricks
Mlflow with databricksMlflow with databricks
Mlflow with databricks
 
Seamless MLOps with Seldon and MLflow
Seamless MLOps with Seldon and MLflowSeamless MLOps with Seldon and MLflow
Seamless MLOps with Seldon and MLflow
 
End to end Machine Learning using Kubeflow - Build, Train, Deploy and Manage
End to end Machine Learning using Kubeflow - Build, Train, Deploy and ManageEnd to end Machine Learning using Kubeflow - Build, Train, Deploy and Manage
End to end Machine Learning using Kubeflow - Build, Train, Deploy and Manage
 
MLOps Virtual Event | Building Machine Learning Platforms for the Full Lifecycle
MLOps Virtual Event | Building Machine Learning Platforms for the Full LifecycleMLOps Virtual Event | Building Machine Learning Platforms for the Full Lifecycle
MLOps Virtual Event | Building Machine Learning Platforms for the Full Lifecycle
 
MLFlow: Platform for Complete Machine Learning Lifecycle
MLFlow: Platform for Complete Machine Learning Lifecycle MLFlow: Platform for Complete Machine Learning Lifecycle
MLFlow: Platform for Complete Machine Learning Lifecycle
 
How to Utilize MLflow and Kubernetes to Build an Enterprise ML Platform
How to Utilize MLflow and Kubernetes to Build an Enterprise ML PlatformHow to Utilize MLflow and Kubernetes to Build an Enterprise ML Platform
How to Utilize MLflow and Kubernetes to Build an Enterprise ML Platform
 
Pyspark Tutorial | Introduction to Apache Spark with Python | PySpark Trainin...
Pyspark Tutorial | Introduction to Apache Spark with Python | PySpark Trainin...Pyspark Tutorial | Introduction to Apache Spark with Python | PySpark Trainin...
Pyspark Tutorial | Introduction to Apache Spark with Python | PySpark Trainin...
 
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
 
MLflow: A Platform for Production Machine Learning
MLflow: A Platform for Production Machine LearningMLflow: A Platform for Production Machine Learning
MLflow: A Platform for Production Machine Learning
 
Redis + Apache Spark = Swiss Army Knife Meets Kitchen Sink
Redis + Apache Spark = Swiss Army Knife Meets Kitchen SinkRedis + Apache Spark = Swiss Army Knife Meets Kitchen Sink
Redis + Apache Spark = Swiss Army Knife Meets Kitchen Sink
 
Vector databases and neural search
Vector databases and neural searchVector databases and neural search
Vector databases and neural search
 
Advanced MLflow: Multi-Step Workflows, Hyperparameter Tuning and Integrating ...
Advanced MLflow: Multi-Step Workflows, Hyperparameter Tuning and Integrating ...Advanced MLflow: Multi-Step Workflows, Hyperparameter Tuning and Integrating ...
Advanced MLflow: Multi-Step Workflows, Hyperparameter Tuning and Integrating ...
 

Similar to MLflow Model Serving

MLflow Model Serving - DAIS 2021
MLflow Model Serving - DAIS 2021MLflow Model Serving - DAIS 2021
MLflow Model Serving - DAIS 2021amesar0
 
DAIS Europe Nov. 2020 presentation on MLflow Model Serving
DAIS Europe Nov. 2020 presentation on MLflow Model ServingDAIS Europe Nov. 2020 presentation on MLflow Model Serving
DAIS Europe Nov. 2020 presentation on MLflow Model Servingamesar0
 
Productionizing Real-time Serving With MLflow
Productionizing Real-time Serving With MLflowProductionizing Real-time Serving With MLflow
Productionizing Real-time Serving With MLflowDatabricks
 
Cnam azure ze cloud resource manager
Cnam azure ze cloud  resource managerCnam azure ze cloud  resource manager
Cnam azure ze cloud resource managerAymeric Weinbach
 
MLflow with Databricks
MLflow with DatabricksMLflow with Databricks
MLflow with DatabricksLiangjun Jiang
 
MLflow: Infrastructure for a Complete Machine Learning Life Cycle with Mani ...
 MLflow: Infrastructure for a Complete Machine Learning Life Cycle with Mani ... MLflow: Infrastructure for a Complete Machine Learning Life Cycle with Mani ...
MLflow: Infrastructure for a Complete Machine Learning Life Cycle with Mani ...Databricks
 
Cloudify workshop at CCCEU 2014
Cloudify workshop at CCCEU 2014 Cloudify workshop at CCCEU 2014
Cloudify workshop at CCCEU 2014 Uri Cohen
 
Introducing MlFlow: An Open Source Platform for the Machine Learning Lifecycl...
Introducing MlFlow: An Open Source Platform for the Machine Learning Lifecycl...Introducing MlFlow: An Open Source Platform for the Machine Learning Lifecycl...
Introducing MlFlow: An Open Source Platform for the Machine Learning Lifecycl...DataWorks Summit
 
Spring Cloud: API gateway upgrade & configuration in the cloud
Spring Cloud: API gateway upgrade & configuration in the cloudSpring Cloud: API gateway upgrade & configuration in the cloud
Spring Cloud: API gateway upgrade & configuration in the cloudOrkhan Gasimov
 
Predicting Flights with Azure Databricks
Predicting Flights with Azure DatabricksPredicting Flights with Azure Databricks
Predicting Flights with Azure DatabricksSarah Dutkiewicz
 
Azure Resource Manager templates: Improve deployment time and reusability
Azure Resource Manager templates: Improve deployment time and reusabilityAzure Resource Manager templates: Improve deployment time and reusability
Azure Resource Manager templates: Improve deployment time and reusabilityStephane Lapointe
 
Seattle Spark Meetup Mobius CSharp API
Seattle Spark Meetup Mobius CSharp APISeattle Spark Meetup Mobius CSharp API
Seattle Spark Meetup Mobius CSharp APIshareddatamsft
 
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Emerson Eduardo Rodrigues Von Staffen
 
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...Amazon Web Services
 
Intro to big data analytics using microsoft machine learning server with spark
Intro to big data analytics using microsoft machine learning server with sparkIntro to big data analytics using microsoft machine learning server with spark
Intro to big data analytics using microsoft machine learning server with sparkAlex Zeltov
 
Microservices Patterns and Anti-Patterns
Microservices Patterns and Anti-PatternsMicroservices Patterns and Anti-Patterns
Microservices Patterns and Anti-PatternsCorneil du Plessis
 
ZZ BC#7 asp.net mvc practice and guideline by NineMvp
ZZ BC#7 asp.net mvc practice and guideline by NineMvpZZ BC#7 asp.net mvc practice and guideline by NineMvp
ZZ BC#7 asp.net mvc practice and guideline by NineMvpChalermpon Areepong
 
Use MLflow to manage and deploy Machine Learning model on Spark
Use MLflow to manage and deploy Machine Learning model on Spark Use MLflow to manage and deploy Machine Learning model on Spark
Use MLflow to manage and deploy Machine Learning model on Spark Herman Wu
 

Similar to MLflow Model Serving (20)

MLflow Model Serving - DAIS 2021
MLflow Model Serving - DAIS 2021MLflow Model Serving - DAIS 2021
MLflow Model Serving - DAIS 2021
 
DAIS Europe Nov. 2020 presentation on MLflow Model Serving
DAIS Europe Nov. 2020 presentation on MLflow Model ServingDAIS Europe Nov. 2020 presentation on MLflow Model Serving
DAIS Europe Nov. 2020 presentation on MLflow Model Serving
 
Productionizing Real-time Serving With MLflow
Productionizing Real-time Serving With MLflowProductionizing Real-time Serving With MLflow
Productionizing Real-time Serving With MLflow
 
Cnam azure ze cloud resource manager
Cnam azure ze cloud  resource managerCnam azure ze cloud  resource manager
Cnam azure ze cloud resource manager
 
MLflow with Databricks
MLflow with DatabricksMLflow with Databricks
MLflow with Databricks
 
MLflow: Infrastructure for a Complete Machine Learning Life Cycle with Mani ...
 MLflow: Infrastructure for a Complete Machine Learning Life Cycle with Mani ... MLflow: Infrastructure for a Complete Machine Learning Life Cycle with Mani ...
MLflow: Infrastructure for a Complete Machine Learning Life Cycle with Mani ...
 
Cloudify workshop at CCCEU 2014
Cloudify workshop at CCCEU 2014 Cloudify workshop at CCCEU 2014
Cloudify workshop at CCCEU 2014
 
Introducing MlFlow: An Open Source Platform for the Machine Learning Lifecycl...
Introducing MlFlow: An Open Source Platform for the Machine Learning Lifecycl...Introducing MlFlow: An Open Source Platform for the Machine Learning Lifecycl...
Introducing MlFlow: An Open Source Platform for the Machine Learning Lifecycl...
 
Spring Cloud: API gateway upgrade & configuration in the cloud
Spring Cloud: API gateway upgrade & configuration in the cloudSpring Cloud: API gateway upgrade & configuration in the cloud
Spring Cloud: API gateway upgrade & configuration in the cloud
 
Predicting Flights with Azure Databricks
Predicting Flights with Azure DatabricksPredicting Flights with Azure Databricks
Predicting Flights with Azure Databricks
 
Azure Resource Manager templates: Improve deployment time and reusability
Azure Resource Manager templates: Improve deployment time and reusabilityAzure Resource Manager templates: Improve deployment time and reusability
Azure Resource Manager templates: Improve deployment time and reusability
 
Seattle Spark Meetup Mobius CSharp API
Seattle Spark Meetup Mobius CSharp APISeattle Spark Meetup Mobius CSharp API
Seattle Spark Meetup Mobius CSharp API
 
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
 
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
 
Cloudformation101
Cloudformation101Cloudformation101
Cloudformation101
 
Intro to big data analytics using microsoft machine learning server with spark
Intro to big data analytics using microsoft machine learning server with sparkIntro to big data analytics using microsoft machine learning server with spark
Intro to big data analytics using microsoft machine learning server with spark
 
Ml2
Ml2Ml2
Ml2
 
Microservices Patterns and Anti-Patterns
Microservices Patterns and Anti-PatternsMicroservices Patterns and Anti-Patterns
Microservices Patterns and Anti-Patterns
 
ZZ BC#7 asp.net mvc practice and guideline by NineMvp
ZZ BC#7 asp.net mvc practice and guideline by NineMvpZZ BC#7 asp.net mvc practice and guideline by NineMvp
ZZ BC#7 asp.net mvc practice and guideline by NineMvp
 
Use MLflow to manage and deploy Machine Learning model on Spark
Use MLflow to manage and deploy Machine Learning model on Spark Use MLflow to manage and deploy Machine Learning model on Spark
Use MLflow to manage and deploy Machine Learning model on Spark
 

More from Databricks

DW Migration Webinar-March 2022.pptx
DW Migration Webinar-March 2022.pptxDW Migration Webinar-March 2022.pptx
DW Migration Webinar-March 2022.pptxDatabricks
 
Data Lakehouse Symposium | Day 1 | Part 1
Data Lakehouse Symposium | Day 1 | Part 1Data Lakehouse Symposium | Day 1 | Part 1
Data Lakehouse Symposium | Day 1 | Part 1Databricks
 
Data Lakehouse Symposium | Day 1 | Part 2
Data Lakehouse Symposium | Day 1 | Part 2Data Lakehouse Symposium | Day 1 | Part 2
Data Lakehouse Symposium | Day 1 | Part 2Databricks
 
Data Lakehouse Symposium | Day 2
Data Lakehouse Symposium | Day 2Data Lakehouse Symposium | Day 2
Data Lakehouse Symposium | Day 2Databricks
 
Data Lakehouse Symposium | Day 4
Data Lakehouse Symposium | Day 4Data Lakehouse Symposium | Day 4
Data Lakehouse Symposium | Day 4Databricks
 
5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop
5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop
5 Critical Steps to Clean Your Data Swamp When Migrating Off of HadoopDatabricks
 
Democratizing Data Quality Through a Centralized Platform
Democratizing Data Quality Through a Centralized PlatformDemocratizing Data Quality Through a Centralized Platform
Democratizing Data Quality Through a Centralized PlatformDatabricks
 
Learn to Use Databricks for Data Science
Learn to Use Databricks for Data ScienceLearn to Use Databricks for Data Science
Learn to Use Databricks for Data ScienceDatabricks
 
Why APM Is Not the Same As ML Monitoring
Why APM Is Not the Same As ML MonitoringWhy APM Is Not the Same As ML Monitoring
Why APM Is Not the Same As ML MonitoringDatabricks
 
The Function, the Context, and the Data—Enabling ML Ops at Stitch Fix
The Function, the Context, and the Data—Enabling ML Ops at Stitch FixThe Function, the Context, and the Data—Enabling ML Ops at Stitch Fix
The Function, the Context, and the Data—Enabling ML Ops at Stitch FixDatabricks
 
Stage Level Scheduling Improving Big Data and AI Integration
Stage Level Scheduling Improving Big Data and AI IntegrationStage Level Scheduling Improving Big Data and AI Integration
Stage Level Scheduling Improving Big Data and AI IntegrationDatabricks
 
Simplify Data Conversion from Spark to TensorFlow and PyTorch
Simplify Data Conversion from Spark to TensorFlow and PyTorchSimplify Data Conversion from Spark to TensorFlow and PyTorch
Simplify Data Conversion from Spark to TensorFlow and PyTorchDatabricks
 
Scaling your Data Pipelines with Apache Spark on Kubernetes
Scaling your Data Pipelines with Apache Spark on KubernetesScaling your Data Pipelines with Apache Spark on Kubernetes
Scaling your Data Pipelines with Apache Spark on KubernetesDatabricks
 
Scaling and Unifying SciKit Learn and Apache Spark Pipelines
Scaling and Unifying SciKit Learn and Apache Spark PipelinesScaling and Unifying SciKit Learn and Apache Spark Pipelines
Scaling and Unifying SciKit Learn and Apache Spark PipelinesDatabricks
 
Sawtooth Windows for Feature Aggregations
Sawtooth Windows for Feature AggregationsSawtooth Windows for Feature Aggregations
Sawtooth Windows for Feature AggregationsDatabricks
 
Re-imagine Data Monitoring with whylogs and Spark
Re-imagine Data Monitoring with whylogs and SparkRe-imagine Data Monitoring with whylogs and Spark
Re-imagine Data Monitoring with whylogs and SparkDatabricks
 
Raven: End-to-end Optimization of ML Prediction Queries
Raven: End-to-end Optimization of ML Prediction QueriesRaven: End-to-end Optimization of ML Prediction Queries
Raven: End-to-end Optimization of ML Prediction QueriesDatabricks
 
Processing Large Datasets for ADAS Applications using Apache Spark
Processing Large Datasets for ADAS Applications using Apache SparkProcessing Large Datasets for ADAS Applications using Apache Spark
Processing Large Datasets for ADAS Applications using Apache SparkDatabricks
 
Massive Data Processing in Adobe Using Delta Lake
Massive Data Processing in Adobe Using Delta LakeMassive Data Processing in Adobe Using Delta Lake
Massive Data Processing in Adobe Using Delta LakeDatabricks
 
Machine Learning CI/CD for Email Attack Detection
Machine Learning CI/CD for Email Attack DetectionMachine Learning CI/CD for Email Attack Detection
Machine Learning CI/CD for Email Attack DetectionDatabricks
 

More from Databricks (20)

DW Migration Webinar-March 2022.pptx
DW Migration Webinar-March 2022.pptxDW Migration Webinar-March 2022.pptx
DW Migration Webinar-March 2022.pptx
 
Data Lakehouse Symposium | Day 1 | Part 1
Data Lakehouse Symposium | Day 1 | Part 1Data Lakehouse Symposium | Day 1 | Part 1
Data Lakehouse Symposium | Day 1 | Part 1
 
Data Lakehouse Symposium | Day 1 | Part 2
Data Lakehouse Symposium | Day 1 | Part 2Data Lakehouse Symposium | Day 1 | Part 2
Data Lakehouse Symposium | Day 1 | Part 2
 
Data Lakehouse Symposium | Day 2
Data Lakehouse Symposium | Day 2Data Lakehouse Symposium | Day 2
Data Lakehouse Symposium | Day 2
 
Data Lakehouse Symposium | Day 4
Data Lakehouse Symposium | Day 4Data Lakehouse Symposium | Day 4
Data Lakehouse Symposium | Day 4
 
5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop
5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop
5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop
 
Democratizing Data Quality Through a Centralized Platform
Democratizing Data Quality Through a Centralized PlatformDemocratizing Data Quality Through a Centralized Platform
Democratizing Data Quality Through a Centralized Platform
 
Learn to Use Databricks for Data Science
Learn to Use Databricks for Data ScienceLearn to Use Databricks for Data Science
Learn to Use Databricks for Data Science
 
Why APM Is Not the Same As ML Monitoring
Why APM Is Not the Same As ML MonitoringWhy APM Is Not the Same As ML Monitoring
Why APM Is Not the Same As ML Monitoring
 
The Function, the Context, and the Data—Enabling ML Ops at Stitch Fix
The Function, the Context, and the Data—Enabling ML Ops at Stitch FixThe Function, the Context, and the Data—Enabling ML Ops at Stitch Fix
The Function, the Context, and the Data—Enabling ML Ops at Stitch Fix
 
Stage Level Scheduling Improving Big Data and AI Integration
Stage Level Scheduling Improving Big Data and AI IntegrationStage Level Scheduling Improving Big Data and AI Integration
Stage Level Scheduling Improving Big Data and AI Integration
 
Simplify Data Conversion from Spark to TensorFlow and PyTorch
Simplify Data Conversion from Spark to TensorFlow and PyTorchSimplify Data Conversion from Spark to TensorFlow and PyTorch
Simplify Data Conversion from Spark to TensorFlow and PyTorch
 
Scaling your Data Pipelines with Apache Spark on Kubernetes
Scaling your Data Pipelines with Apache Spark on KubernetesScaling your Data Pipelines with Apache Spark on Kubernetes
Scaling your Data Pipelines with Apache Spark on Kubernetes
 
Scaling and Unifying SciKit Learn and Apache Spark Pipelines
Scaling and Unifying SciKit Learn and Apache Spark PipelinesScaling and Unifying SciKit Learn and Apache Spark Pipelines
Scaling and Unifying SciKit Learn and Apache Spark Pipelines
 
Sawtooth Windows for Feature Aggregations
Sawtooth Windows for Feature AggregationsSawtooth Windows for Feature Aggregations
Sawtooth Windows for Feature Aggregations
 
Re-imagine Data Monitoring with whylogs and Spark
Re-imagine Data Monitoring with whylogs and SparkRe-imagine Data Monitoring with whylogs and Spark
Re-imagine Data Monitoring with whylogs and Spark
 
Raven: End-to-end Optimization of ML Prediction Queries
Raven: End-to-end Optimization of ML Prediction QueriesRaven: End-to-end Optimization of ML Prediction Queries
Raven: End-to-end Optimization of ML Prediction Queries
 
Processing Large Datasets for ADAS Applications using Apache Spark
Processing Large Datasets for ADAS Applications using Apache SparkProcessing Large Datasets for ADAS Applications using Apache Spark
Processing Large Datasets for ADAS Applications using Apache Spark
 
Massive Data Processing in Adobe Using Delta Lake
Massive Data Processing in Adobe Using Delta LakeMassive Data Processing in Adobe Using Delta Lake
Massive Data Processing in Adobe Using Delta Lake
 
Machine Learning CI/CD for Email Attack Detection
Machine Learning CI/CD for Email Attack DetectionMachine Learning CI/CD for Email Attack Detection
Machine Learning CI/CD for Email Attack Detection
 

Recently uploaded

Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingNeil Barnes
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfSocial Samosa
 
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...Suhani Kapoor
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxEmmanuel Dauda
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
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
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsappssapnasaifi408
 
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
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSAishani27
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubaihf8803863
 
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一ffjhghh
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...shivangimorya083
 
Digi Khata Problem along complete plan.pptx
Digi Khata Problem along complete plan.pptxDigi Khata Problem along complete plan.pptx
Digi Khata Problem along complete plan.pptxTanveerAhmed817946
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxStephen266013
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxJohnnyPlasten
 
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
 
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改atducpo
 

Recently uploaded (20)

Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data Storytelling
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
 
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptx
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
 
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
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
 
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
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICS
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
 
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
 
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
 
Digi Khata Problem along complete plan.pptx
Digi Khata Problem along complete plan.pptxDigi Khata Problem along complete plan.pptx
Digi Khata Problem along complete plan.pptx
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docx
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.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
 
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
 

MLflow Model Serving

  • 1. Model Serving 27 May 2021 Andre Mesarovic Sr. Resident Solutions Architect at Databricks
  • 2. Agenda • MLflow model serving • How to score models with MLflow ○ Offline scoring with Spark ○ Online scoring with MLflow model server • Custom model deployment and scoring • Databricks model server
  • 3. Prediction overview Offline Prediction ● High throughput ● Bulk predictions ● Predict with Spark/Databricks ● Batch Prediction ● Structured Streaming Prediction Online Prediction ● Low latency ● Individual predictions ● Real-time model serving ● MLflow scoring server ● MLflow deployment plugin ● Serving outside MLflow ● Databricks model serving
  • 4. Vocabulary - Synonyms Model Serving ● Model serving ● Model scoring ● Model prediction ● Model inference ● Model deployment Prediction Types ● Offline == batch prediction ○ Spark batch prediction ○ Spark streaming prediction ● Online == real-time prediction
  • 6. Offline Scoring • Spark is ideally suited for offline scoring • Distributed scoring with Spark • Can use either Spark batch or structured streaming • Use MLflow UDF (Python or SQL) to parallelize scoring for single-node frameworks such as scikit-learn • Create UDF model using Pyfunc flavor • Load model from MLflow Model Registry
  • 7. MLflow Offline Scoring Example Score with native flavor model = mlflow.sklearn.load_model(model_uri) predictions = model.predict(data) Score with Python UDF model_uri = "models:/sklearn-wine/production" Model URI model = mlflow.pyfunc.load_model(model_uri) predictions = model.predict(data) Score with Pyfunc flavor udf = mlflow.pyfunc.spark_udf(spark, model_uri) predictions = data.withColumn("prediction", udf(*data.columns)) Score with SQL UDF udf = mlflow.pyfunc.spark_udf(spark, model_uri) spark.udf.register("predict", udf) %sql select *, predict(*) as prediction from my_data
  • 8. Online Scoring • Score models outside of Spark • Low-latency scoring one record at a time with immediate feedback • Variety of real-time deployment options: ○ REST API - web servers - self-managed or as containers in cloud providers ○ Embedded in browsers, .e.g TensorFlow Lite ○ Edge devices: mobile phones, sensors, routers, etc. ○ Hardware accelerators - GPU, NVIDIA, Intel
  • 9. Options to serve real-time models • Embed model in application code • Model deployed as a service • Model published as data • Martin Fowler’s Continuous Delivery for Machine Learning
  • 10. MLflow Model Server • Cornerstone of different MLflow deployment targets • Web server that exposes a standard REST API: ○ Input: CSV, JSON (pandas-split or pandas-records formats) or Tensor (JSON) ○ Output: JSON list of predictions • Implementation: Python Flask or Java Jetty server (only MLeap) • MLflow CLI builds a server with embedded model • See Serving the Model and Built-In Deployment Tools
  • 11. MLflow Model Server deployment options • Local web server • SageMaker docker container • Azure ML docker container • Generic docker container • Custom deployment plugin targets ○ TorchServe, RedisAi, Ray or Algorithmia
  • 12. MLflow Model Server container types Python Server Model and its ML framework libraries embedded in Flask server. Only for non- Spark ML models. Python Server + Spark Flask server delegates scoring to Spark server. Only for Spark ML models. Java MLeap Server Model and MLeap runtime are embedded in Jetty server. Only for Spark ML models. No Spark runtime.
  • 13. MLflow Model Server container types
  • 14. Launch Local MLflow Model Server mlflow models serve --model-uri models:/sklearn-iris/production --port 5001 Launch server Launch local server
  • 15. Score with CSV format curl http://localhost:5001/invocations -H "Content-Type:text/csv" -d ' sepal_length,sepal_width,petal_length,petal_width 5.1,3.5,1.4,0.2 4.9,3.0,1.4,0.2' Launch server Request [0, 0] Launch server Response
  • 16. Score with JSON split-oriented format curl http://localhost:5001/invocations -H "Content-Type:application/json" -d ' { "columns": ["sepal_length", "sepal_width", "petal_length", "petal_width"], "data": [ [ 5.1, 3.5, 1.4, 0.2 ], [ 4.9, 3.0, 1.4, 0.2 ] ] }' Launch server Request [0, 0] Launch server Response
  • 17. Score with JSON record-oriented format curl http://localhost:5001/invocations -H "Content-Type:application/json; format=pandas-records" -d '[ { "sepal_length": 5.1, "sepal_width": 3.5, "petal_length": 1.4, "petal_width": 0.2 }, { "sepal_length": 4.9, "sepal_width": 3.0, "petal_length": 1.4, "petal_width": 0.2 } ]' Launch server Request [0, 0] Launch server Response
  • 18. Score with JSON Tensor ● Tensor Input Now Supported in MLflow - Databricks blog - 2021-03-18 ● Request will be cast to Numpy arrays. This format is specified using a Content-Type request header value of application/json and the instances or inputs key in the request body dictionary ● Content-type is application/json - 2 request formats will be inferred ● See Deploy MLflow models - MLflow doc ● TFX Serving request format - TensorFlow doc
  • 19. Score with JSON Tensor - numpy/tensor curl http://127.0.0.1:5000/invocations -H 'Content-Type: application/json' -d '{ "instances": [ {"a": "s1", "b": 1, "c": [1, 2, 3]}, {"a": "s2", "b": 2, "c": [4, 5, 6]}, {"a": "s3", "b": 3, "c": [7, 8, 9]} ] }' Launch server TensorFlow serving "instances" format curl http://127.0.0.1:5000/invocations -H 'Content-Type: application/json' -d '{ "inputs": { "a": ["s1", "s2", "s3"], "b": [1, 2, 3] }' Launch server TensorFlow serving "inputs" format
  • 20. MLflow SageMaker and Azure ML containers • Two types of containers are deployed to cloud providers ○ Python container - Flask web server process with embedded model ○ SparkML container - Flask web server process and Spark process • SageMaker container ○ Most versatile container type ○ Can run in local mode on laptop as regular docker container
  • 21. Python container • Flask web server • Flask server runs behind gunicorn to allow concurrent requests • Serialized model (e.g. sklearn or Keras/TF) is embedded inside web server and wrapped by Pyfunc • Server leverages Pyfunc flavor to make generic predictions
  • 22. SparkML container • Two processes: ○ Flask web server ○ Spark server - OSS Spark - no Databricks • Web server delegates scoring to Spark server
  • 23. MLflow SageMaker container deployment • CLI: ○ mlflow sagemaker build-and-push-container ○ mlflow sagemaker deploy ○ mlflow sagemaker run-local • API: mlflow.sagemaker API • Deploy a model on Amazon SageMaker
  • 24. mlflow sagemaker build-and-push-container --build --container my-container mlflow sagemaker deploy --app-name wine-quality --model-uri models:/wine-quality/production --image-url my-image-url --region us-west-2 --mode replace Launch server Launch container on SageMaker Launch container on SageMaker mlflow sagemaker build-and-push-container --build --no-push --container my-container mlflow sagemaker run-local --model-uri models:/wine-quality/production --port 5051 --image my-container Launch server Launch local container Deploy MLflow SageMaker container
  • 25. MLflow AzureML container deployment • Deploy to Azure Kubernetes Service (AKS) or Azure Container Instances (ACI) • CLI - mlflow azureml build-image • API - mlflow.azureml.build-image • Deploy a python_function model on Microsoft Azure ML
  • 26. model_image, azure_model = mlflow.azureml.build_image( model_uri="models:/sklearn_wine", workspace="my_workspace", model_name="sklearn_wine", image_name="sklearn_wine_image", description="Sklearn Wine Quality", synchronous=True) Deploy MLflow Azure ML container
  • 27. MLeap • Non-Spark serialization format for Spark models • Advantage is ability to score Spark model without overhead of Spark • Faster than scoring Spark ML models with Spark • Problem is stability, maturity and lack of dedicated commercial support
  • 28. End-to-end ML Pipeline Example with MLflow See mlflow-examples - e2e-ml-pipeline
  • 29. MLflow Deployment Plugins • MLflow Deployment Plugins - Deploy model to custom serving platform • Current deployment plugins: ○ mlflow-torchserve ○ mlflow-redisai ○ mlflow-algorithmia ○ mlflow-ray-serve
  • 30. MLflow Deployment Plugin Examples Ray mlflow deployments create -t torchserve ---name DEPLOYMENT_NAME -m <model uri> -C 'MODEL_FILE=<model file path>' -C 'HANDLER=<handler file path>' TorchServe mlflow deployments create -t redisai --name <rediskey> -m <model uri> -C <config option> RedisAI mlflow deployments create -t ray-serve --name <deployment name> -m <model uri> -C num_replicas=<number of replicas> Algorithmia mlflow deployments create -t algorithmia --name mlflow_sklearn_demo -m mlruns/0/<run-id>/artifacts/model
  • 31. • MLflow PyTorch integration released in MLflow 1.12.0 (Nov. 2020) • Integrates with PyTorch Lightning, TorchScript and TorchServe • Features: ○ Autologging with PyTorch Lightning ○ Translate to TorchScript model format for Python-free optimized scoring ○ Deploy MLflow models to TorchServe MLflow + PyTorch = 🧡
  • 33. MLflow TorchServe Resources • PyTorch and MLflow Integration Announcement - 2020-11-12 • MLflow 1.12 Features Extended PyTorch Integration - 2012-11- 13 • MLflow and PyTorch — Where Cutting Edge AI meets MLOps - medium - pytorch - 2020-11-12 • https://github.com/mlflow/mlflow-torchserve
  • 34. MLflow RedisAI Resources • https://github.com/RedisAI/mlflow-redisai • All you need is PyTorch, MLflow, RedisAI and a cup of mocha latte - medium - 2020-08-28 • Taking Deep Learning to Production with MLflow & RedisAI - video - 30:16 - Sherin Thomas (RedisAI) - 2020-08-30 • PyPI mlflow-redisai
  • 35. MLflow Ray Resources • github.com/ray-project/mlflow-ray-serve ○ mlflow_example.py - test_mlflow_plugin.py • Ray & MLflow: Taking Distributed Machine Learning Applications to Production blog ○ Databricks blog - 2021-02-03 ○ Ray blog - 2021-01-13 • Using MLflow with Tune - Ray docs • PyPI mlflow-ray-serve
  • 36. MLflow Algorithmia Resources • MLFlow Integrations - Development Center - Algorithmia • https://github.com/algorithmiaio/mlflow-algorithmia • Algorithmia and MLflow: Integrating open-source tooling with enterprise MLOps - Algorithmia blog - 2021-04-15 • pip install mlflow-algorithmia • MLflow Integration from Azure ML and Algorithmia - video - 1:03:12 - DAIS-2021 -2021-04-22 • Algorithmia and MLflow: Integrating open-source tooling with enterprise MLOps - video - 11:19 - 2021-04-01
  • 37. MLflow and TensorFlow Serving Custom Deployment • Example how to deploy models to a custom deployment target • MLflow deployment plugin has not yet been developed • Deployment builds a standard TensorFlow Serving docker container with a MLflow model from Model Registry • https://github.com/amesar/mlflow- tools/tree/master/mlflow_tools/tensorflow_serving
  • 38. Keras/TensorFlow Model Formats • SavedModel format ○ TensorFlow standard format is default in Keras TF 2.x ○ Supported by TensorFlow Serving ○ As of MLflow 1.15.0 SavedModel is the default MLflow format • HD5 format ○ Default in Keras TF 1.x but is legacy in Keras TF 2.x ○ Not supported by TensorFlow Serving
  • 40. TensorFlow Serving Example docker run -t --rm --publish 8501 --volume /opt/mlflow/mlruns/1/f48dafd70be044298f71488b0ae10df4/artifacts/tensorflow- model:/models/keras_wine --env MODEL_NAME=keras_wine tensorflow/serving Launch server Launch server in Docker container curl -d '{"instances": [12.8, 0.03, 0.48, 0.98, 6.2, 29, 1.2, 0.4, 75 ] }' -X POST http://localhost:8501/v1/models/keras_wine:predict Launch server Request { "predictions": [[-0.70597136]] } Launch server Response
  • 41. MLflow Keras/TensorFlow Run Models Example MLflow Flavors - Managed Models ● Model flavors ○ tensorflow-model - standard SavedModel format (saved_model.pb) ○ onnx-model ● Can be served as Pyfunc models MLflow Unmanaged Models ● Models ○ tensorflow-model - Standard TF SavedModel format ○ tensorflow-lite-model ○ tensorflow.js model ● Load as raw artifacts and then serve manually ● Sample code: wine_train.py and wine_predict.py
  • 42. ONNX - Open Neural Network Exchange • Interoperable model format supported by: ○ MSFT, Facebook, AWS, Nvidia, Intel, etc. • Train once, deploy anywhere (in theory) - depends on the robustness of ML framework conversion • Save MLflow model as ONNX flavor • Deploy ONNX model in standard MLflow scoring server • ONNX runtime is embedded in MLflow Python model server
  • 43. Model Serving on Databricks Model Serving Turnkey serving solution to expose models as REST endpoints new Reports Applications ... REST Endpoint Tracking Record and query experiments: code, metrics, parameters, artifacts, models Models General format that standardizes deployment options Logged Model Model Registry Centralized and collaborative model lifecycle management Staging Production Archived Data Scientists Deployment Engineers
  • 44. Current Databricks Model Serving - Public Preview • HTTP endpoint publicly exposed using Databricks authentication • One node cluster is automatically provisioned • Can select instance type • Limited production capability - for light loads and testing • Hosts all active versions of a model • Can score from UI or via HTTP (curl, Python Requests)
  • 45. Databricks Production-grade Model Serving • Production-grade serving is on the product roadmap • Spin up a multi-node cluster • Model monitoring, model drift detection and metrics • Log prediction requests and responses • Low latency, high availability and scalable • GPU support
  • 48. Score with curl curl https:/my_workspace.acme.com/my_model/Production/invocations -H "Content-Type:application/json" -d ' { "columns": ["sepal_length", "sepal_width", "petal_length", "petal_width"], "data": [ [ 5.1, 3.5, 1.4, 0.2 ], [ 4.9, 3.0, 1.4, 0.2 ] ] }' Launch server Request [0, 0] Launch server Response
  • 49. Databricks Model Serving Resources • Blog posts ○ Quickly Deploy, Test, and Manage ML Models as REST Endpoints with MLflow Model Serving on Databricks - 2020-11-02 ○ Announcing MLflow Model Serving on Databricks - 2020-06-25 • Documentation ○ MLflow Model Serving on Databricks
  • 50. Feedback Your feedback is important to us. Don’t forget to rate and review the sessions.