SlideShare a Scribd company logo
1 of 22
Download to read offline
Deploy and serve model from
Azure Databricks
onto Azure Machine Learning
- Reema Kuvadia ( Software Engineer 2)
- Tao Li (Senior Applied Scientist)
Agenda
▪ Model Training and
experimenting
▪ Model Deployment
▪ Model Consumption and Azure
website deployment
Azure Resources
Azure Databricks Azure Blob Storage Azure Machine Learning Azure Kubernetes Azure Web Service
Azure Databricks is an
Apache Spark-based
analytics platform
optimized for the Microsoft
Azure cloud services
platform
Experiment on Azure
Databricks
Model training using
PySpark
Azure Blob storage is a
service for storing large
amounts of unstructured
object data
Published model is stored
in Azure blob storage
Azure machine learning is
a cloud-based service
used to build, test and
deploy predictive analytics
solutions based on your
data
Register the model to
Azure Machine Learning
Azure Kubernetes
Service (AKS) is a
managed container
orchestration service,
based on the open
source Kubernetes system,
which is available on
the Azure public cloud
Create model image and
create endpoint
Microsoft Azure Web Sites
is a cloud computing based
platform for hosting
websites, created and
operated by Microsoft.
Model serve as Web
Service on Azure
Consume model using
RestAPI endpoint
Model Training Model Storing Model Deployment Model Severing
Model
Consumption
Demo 1:
Deployment of Azure Resources
using ARM Template
Session 1: Model Training and Experimenting
Introduction to the problem
▪ The current solutions mostly rely on dictionary/vocabulary, regular expression, and rule-based loop up
and matching to identify the semantic types.
▪ not robust to dirty and complex data
▪ not generalized to diverse data types.
▪
Problem: Correctly detecting the semantic types of data (column of data) is critical for data science
tasks such as data cleaning/normalization, data matching, and data enrichment.
Data Type
D. James, Kevin Louis, Steven Moring, Thomas V. Beard Name
Chicago, Seattle, Tenn, TBA Location
2019-10-12, Oct 12, 2019, 10/12/2019, 20191012 Date
Model E2E Flow
…
Data
…
App
Model Training
Experiment on Azure
Databricks
Model training using
PySpark
Azure Databricks
PySpark
Model Packaging
Package model using
MLeap
Publish model to azure
blob storage
Azure Blob Storage
Define Deployment
Define model environment
and dependencies
Prepare Scoring script
Visual Studio Code
Register the model to
Azure Machine Learning
Create model image
Deploy to azure
Kubernetes web service
Model Deployment
Azure Machine
Learning
Azure Kubernetes
Serve & Consume
Model serve as Web
Service on Azure
Consume model using
RestAPI endpoint
Azure Web Service
Model Architecture and Training
▪ Featurization
▪ Embedding Dataframe lookup in memory
▪ Spark SQL for featurization using UDF (user-defined function)
Multi-class Classification using Random Forest
▪ Modeling
▪
▪
text
Web Table:
Bing RetroIndex
Public Table:
Paper Data
Customer Table:
Demo Data
First Name Date Phone
John
Michael
...
Richard
2015-11-19 1-925-226-7368x212
08/15/2015 830-115-4090
... ...
May 27, 2016 (067)681-4908
1. Data Source &Table repository 2. Tabular Data & Features
Header Embeddings
Character Distributions
Word Embeddings
Global Statistics
Header statistics
Feature Extraction
(Data)
Column Data
Column Header
Feature Extraction
(Header)
Label Extraction
...
Person
.FirstName
Calendar
.Date
Identity.Service
.Phone
...
Features Labels
concatenate
Label Cleaning
3. Training and Testing 4. Semantic Type Detection
Training
Testing
Table for scoring
ML Model
Predicted Type
+
Confidence Score
Location.City: 0.8
NA: 0.6
Calendar.Year: 0.9
Excel Table
...
Demo 2:
Training the model using Azure Databricks
Session 2: Model Deployment
Model Deployment
▪ Model training on Azure Databricks.
▪ Package model and publish into Azure Blob
Storage
▪ Prerequisites
▪ AML (Azure Machine Learning) Workspace
▪ AKS (Azure Kubernetes Service) Cluster
▪ Azure Machine Learning and Storage SDK
▪ Model Registry
Registering a model to store, version, and track metadata about
models in your workspace.
▪ Define deployment
▪ Scoring File (named score.py)
▪ Loads the model when the deployed service starts.
▪ Receiving data, passing it to the model, and then returning
a response.
▪ AML environment. (software dependencies and libraries)
▪ Deploy the model
▪ Create the image
▪ Config the entry script and environment
▪ Config Runtime (runtime="spark-py")
▪ CPU and Memory
▪ Deploy image as a web app
▪ Deploy the model to AKS cluster
▪ Get model endpoint
▪ Consume the model
▪ Use the model via SDK
▪ Use the model via Endpoints
Scoring File (Score.py)
▪ init():
▪ This function loads the model into a global object.
▪ This function is run only once, when the Docker container
start the web service.
The entry script receives data submitted to a deployed web service and passes it to the model. It then
takes the response returned by the model and returns that to the client. The script contains two
functions that load and run the model:
def run(input_data):
try:
data = json.loads(input_data)['data’]
features = Featurization_new(data)
feature_df = spark.createDataFrame([features,], names)
predictions_raw = model.transform(feature_df)
predictions = predictions_raw.select("prediction", "features")
#Get each scored result
predictions = predictions.collect()
preds = [str(x['prediction']) for x in predictions]
return preds[0]
except Exception as e:
def init():
global spark
global model
global word_to_embedding
spark = SparkSession.builder.getOrCreate()
model_path = Model.get_model_path('semantic_mapping_model')
model = PipelineModel.load(model_path)
embedding_path = Model.get_model_path('word_to_embedding.pkl')
file = open(embedding_path, 'rb')
word_to_embedding = pickle.load(file)
file.close()
▪ run(input_data):
▪ This function uses the model to predict a value based on
the input data.
▪ Inputs and outputs of the run typically use JSON for
serialization and deserialization.
Demo 3:
Model Deployment using
Azure Machine Learning
Session 3: Model Consumption
Model Consumption and Website Deployment
▪ Registration:
▪ To register model we need following:
▪ Path: (string) location of model
▪ Name: (string) model name
▪ Description: (string) that describes the model
▪ Worskapce: (string) name of workspace that we want
to consume in webservice.
In this script we register the model, create or use existing environment using YAML file.
Then deploy model as Webservice on AKS which will create and endpoint, that we consume in the
website.
name : project_environment
dependencies :
- python=3.6.2
- pip:
- azureml-defaults
- scikit-learn
- numpy
- inference-schema[numpy-support]
from azureml.core.model import Model
embedding = Model(ws, 'word_to_embedding.pkl')
if not embedding:
embedding = Model.register(model_path="./model/word_to_embedding.pkl
",
model_name="word_to_embedding.pkl",
description="Word to embedding",
workspacee=ws)
▪ Environment config file:
▪ You can now create and/or use an Environment object
when deploying a Webservice. The Environment can have
been previously registered with your Workspace, or it will
be registered with it as a part of the Webservice
deployment.
Application Demo
Semantic Mapping
Automatically
detects the correct
Attribute Type
And can prevent
possible human error
(due to data input or
miss-understanding)
Demo 4:
Model consumption by creating
endpoint in AKS and consuming
it using Azure Web Service
Summary
▪ Spark APIs we used are:
▪ Spark SQL and UDF (User Defined Functions) for
featurization
▪
▪ Microsoft Azure for making it
seamless to integrate with 3rd
party platforms
References
▪ Databricks
▪ https://docs.microsoft.com/en-us/azure/azure-databricks/quickstart-create-databricks-workspace-resource-manager-template
▪ https://github.com/Azure/azure-quickstart-templates/tree/master/101-databricks-all-in-one-template-for-vnet-injection
▪ Azure Blob Storage
▪ https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-portal
▪ https://github.com/Azure/azure-quickstart-templates/tree/master/101-storage-blob-container
▪ Azure Machine Learning
▪ https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/machine-learning/studio/deploy-with-resource-manager-
template.md
▪ https://docs.microsoft.com/en-us/azure/machine-learning/tutorial-1st-experiment-sdk-setup
▪ Azure Website Deployment
▪ https://docs.microsoft.com/en-us/visualstudio/deployment/quickstart-deploy-to-azure?view=vs-2019&viewFallbackFrom=vs-
2019%E2%80%8B
Feedback
Your feedback is important to us.
Don’t forget to rate and
review the sessions.
Deploy Spark model from Azure Databricks to Azure ML

More Related Content

What's hot

Apply MLOps at Scale by H&M
Apply MLOps at Scale by H&MApply MLOps at Scale by H&M
Apply MLOps at Scale by H&MDatabricks
 
Learn to Use Databricks for the Full ML Lifecycle
Learn to Use Databricks for the Full ML LifecycleLearn to Use Databricks for the Full ML Lifecycle
Learn to Use Databricks for the Full ML LifecycleDatabricks
 
Azure DataBricks for Data Engineering by Eugene Polonichko
Azure DataBricks for Data Engineering by Eugene PolonichkoAzure DataBricks for Data Engineering by Eugene Polonichko
Azure DataBricks for Data Engineering by Eugene PolonichkoDimko Zhluktenko
 
MLOps with Azure DevOps
MLOps with Azure DevOpsMLOps with Azure DevOps
MLOps with Azure DevOpsMarco Parenzan
 
ML-Ops how to bring your data science to production
ML-Ops  how to bring your data science to productionML-Ops  how to bring your data science to production
ML-Ops how to bring your data science to productionHerman Wu
 
MLflow with Databricks
MLflow with DatabricksMLflow with Databricks
MLflow with DatabricksLiangjun Jiang
 
How to Build a ML Platform Efficiently Using Open-Source
How to Build a ML Platform Efficiently Using Open-SourceHow to Build a ML Platform Efficiently Using Open-Source
How to Build a ML Platform Efficiently Using Open-SourceDatabricks
 
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
 
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
 
Data Quality Patterns in the Cloud with Azure Data Factory
Data Quality Patterns in the Cloud with Azure Data FactoryData Quality Patterns in the Cloud with Azure Data Factory
Data Quality Patterns in the Cloud with Azure Data FactoryMark Kromer
 
Serverless Machine Learning Model Inference on Kubernetes with KServe.pdf
Serverless Machine Learning Model Inference on Kubernetes with KServe.pdfServerless Machine Learning Model Inference on Kubernetes with KServe.pdf
Serverless Machine Learning Model Inference on Kubernetes with KServe.pdfStavros Kontopoulos
 
Azure Compute, Networking and Storage Overview
Azure Compute, Networking and Storage OverviewAzure Compute, Networking and Storage Overview
Azure Compute, Networking and Storage OverviewAzure Riyadh User Group
 
MLOps – Applying DevOps to Competitive Advantage
MLOps – Applying DevOps to Competitive AdvantageMLOps – Applying DevOps to Competitive Advantage
MLOps – Applying DevOps to Competitive AdvantageDATAVERSITY
 
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
 
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
 
"Managing the Complete Machine Learning Lifecycle with MLflow"
"Managing the Complete Machine Learning Lifecycle with MLflow""Managing the Complete Machine Learning Lifecycle with MLflow"
"Managing the Complete Machine Learning Lifecycle with MLflow"Databricks
 
MLOps - The Assembly Line of ML
MLOps - The Assembly Line of MLMLOps - The Assembly Line of ML
MLOps - The Assembly Line of MLJordan Birdsell
 
Neo4j & AWS Bedrock workshop at GraphSummit London 14 Nov 2023.pptx
Neo4j & AWS Bedrock workshop at GraphSummit London 14 Nov 2023.pptxNeo4j & AWS Bedrock workshop at GraphSummit London 14 Nov 2023.pptx
Neo4j & AWS Bedrock workshop at GraphSummit London 14 Nov 2023.pptxNeo4j
 

What's hot (20)

Apply MLOps at Scale by H&M
Apply MLOps at Scale by H&MApply MLOps at Scale by H&M
Apply MLOps at Scale by H&M
 
Lakehouse in Azure
Lakehouse in AzureLakehouse in Azure
Lakehouse in Azure
 
Learn to Use Databricks for the Full ML Lifecycle
Learn to Use Databricks for the Full ML LifecycleLearn to Use Databricks for the Full ML Lifecycle
Learn to Use Databricks for the Full ML Lifecycle
 
Azure DataBricks for Data Engineering by Eugene Polonichko
Azure DataBricks for Data Engineering by Eugene PolonichkoAzure DataBricks for Data Engineering by Eugene Polonichko
Azure DataBricks for Data Engineering by Eugene Polonichko
 
MLOps with Azure DevOps
MLOps with Azure DevOpsMLOps with Azure DevOps
MLOps with Azure DevOps
 
MLOps in action
MLOps in actionMLOps in action
MLOps in action
 
ML-Ops how to bring your data science to production
ML-Ops  how to bring your data science to productionML-Ops  how to bring your data science to production
ML-Ops how to bring your data science to production
 
MLflow with Databricks
MLflow with DatabricksMLflow with Databricks
MLflow with Databricks
 
How to Build a ML Platform Efficiently Using Open-Source
How to Build a ML Platform Efficiently Using Open-SourceHow to Build a ML Platform Efficiently Using Open-Source
How to Build a ML Platform Efficiently Using Open-Source
 
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
 
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...
 
Data Quality Patterns in the Cloud with Azure Data Factory
Data Quality Patterns in the Cloud with Azure Data FactoryData Quality Patterns in the Cloud with Azure Data Factory
Data Quality Patterns in the Cloud with Azure Data Factory
 
Serverless Machine Learning Model Inference on Kubernetes with KServe.pdf
Serverless Machine Learning Model Inference on Kubernetes with KServe.pdfServerless Machine Learning Model Inference on Kubernetes with KServe.pdf
Serverless Machine Learning Model Inference on Kubernetes with KServe.pdf
 
Azure Compute, Networking and Storage Overview
Azure Compute, Networking and Storage OverviewAzure Compute, Networking and Storage Overview
Azure Compute, Networking and Storage Overview
 
MLOps – Applying DevOps to Competitive Advantage
MLOps – Applying DevOps to Competitive AdvantageMLOps – Applying DevOps to Competitive Advantage
MLOps – Applying DevOps to Competitive Advantage
 
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
 
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
 
"Managing the Complete Machine Learning Lifecycle with MLflow"
"Managing the Complete Machine Learning Lifecycle with MLflow""Managing the Complete Machine Learning Lifecycle with MLflow"
"Managing the Complete Machine Learning Lifecycle with MLflow"
 
MLOps - The Assembly Line of ML
MLOps - The Assembly Line of MLMLOps - The Assembly Line of ML
MLOps - The Assembly Line of ML
 
Neo4j & AWS Bedrock workshop at GraphSummit London 14 Nov 2023.pptx
Neo4j & AWS Bedrock workshop at GraphSummit London 14 Nov 2023.pptxNeo4j & AWS Bedrock workshop at GraphSummit London 14 Nov 2023.pptx
Neo4j & AWS Bedrock workshop at GraphSummit London 14 Nov 2023.pptx
 

Similar to Deploy Spark model from Azure Databricks to Azure ML

Azure machine learning service
Azure machine learning serviceAzure machine learning service
Azure machine learning serviceRuth Yakubu
 
I want my model to be deployed ! (another story of MLOps)
I want my model to be deployed ! (another story of MLOps)I want my model to be deployed ! (another story of MLOps)
I want my model to be deployed ! (another story of MLOps)AZUG FR
 
Machine Learning Use Case - Agriculture
Machine Learning Use Case - AgricultureMachine Learning Use Case - Agriculture
Machine Learning Use Case - AgricultureNilabja GhoshChowdhury
 
Build and deploy PyTorch models with Azure Machine Learning - Henk - CCDays
Build and deploy PyTorch models with Azure Machine Learning - Henk - CCDaysBuild and deploy PyTorch models with Azure Machine Learning - Henk - CCDays
Build and deploy PyTorch models with Azure Machine Learning - Henk - CCDaysCodeOps Technologies LLP
 
Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...
Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...
Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...Shift Conference
 
Train, predict, serve: How to go into production your machine learning model
Train, predict, serve: How to go into production your machine learning modelTrain, predict, serve: How to go into production your machine learning model
Train, predict, serve: How to go into production your machine learning modelCloudera Japan
 
Trenowanie i wdrażanie modeli uczenia maszynowego z wykorzystaniem Google Clo...
Trenowanie i wdrażanie modeli uczenia maszynowego z wykorzystaniem Google Clo...Trenowanie i wdrażanie modeli uczenia maszynowego z wykorzystaniem Google Clo...
Trenowanie i wdrażanie modeli uczenia maszynowego z wykorzystaniem Google Clo...Sotrender
 
How to Train Your Classifier: Create a Serverless Machine Learning System wit...
How to Train Your Classifier: Create a Serverless Machine Learning System wit...How to Train Your Classifier: Create a Serverless Machine Learning System wit...
How to Train Your Classifier: Create a Serverless Machine Learning System wit...Stuart Myles
 
Productionizing Machine Learning Pipelines with Databricks and Azure ML
Productionizing Machine Learning Pipelines with Databricks and Azure MLProductionizing Machine Learning Pipelines with Databricks and Azure ML
Productionizing Machine Learning Pipelines with Databricks and Azure MLDatabricks
 
Unsupervised Aspect Based Sentiment Analysis at Scale
Unsupervised Aspect Based Sentiment Analysis at ScaleUnsupervised Aspect Based Sentiment Analysis at Scale
Unsupervised Aspect Based Sentiment Analysis at ScaleAaron (Ari) Bornstein
 
Chris O'Brien - Best bits of Azure for Office 365/SharePoint developers
Chris O'Brien - Best bits of Azure for Office 365/SharePoint developersChris O'Brien - Best bits of Azure for Office 365/SharePoint developers
Chris O'Brien - Best bits of Azure for Office 365/SharePoint developersChris O'Brien
 
AWS CloudFormation Intrinsic Functions and Mappings
AWS CloudFormation Intrinsic Functions and Mappings AWS CloudFormation Intrinsic Functions and Mappings
AWS CloudFormation Intrinsic Functions and Mappings Adam Book
 
ML_Development_with_Sagemaker.pptx
ML_Development_with_Sagemaker.pptxML_Development_with_Sagemaker.pptx
ML_Development_with_Sagemaker.pptxTemiReply
 
201908 Overview of Automated ML
201908 Overview of Automated ML201908 Overview of Automated ML
201908 Overview of Automated MLMark Tabladillo
 
Tooling for Machine Learning: AWS Products, Open Source Tools, and DevOps Pra...
Tooling for Machine Learning: AWS Products, Open Source Tools, and DevOps Pra...Tooling for Machine Learning: AWS Products, Open Source Tools, and DevOps Pra...
Tooling for Machine Learning: AWS Products, Open Source Tools, and DevOps Pra...SQUADEX
 
10 things I’ve learnt In the clouds
10 things I’ve learnt In the clouds10 things I’ve learnt In the clouds
10 things I’ve learnt In the cloudsStuart Lodge
 
Azuresatpn19 - An Introduction To Azure Data Factory
Azuresatpn19 - An Introduction To Azure Data FactoryAzuresatpn19 - An Introduction To Azure Data Factory
Azuresatpn19 - An Introduction To Azure Data FactoryRiccardo Perico
 
AI with Azure Machine Learning
AI with Azure Machine LearningAI with Azure Machine Learning
AI with Azure Machine LearningGeert Baeke
 

Similar to Deploy Spark model from Azure Databricks to Azure ML (20)

Azure machine learning service
Azure machine learning serviceAzure machine learning service
Azure machine learning service
 
I want my model to be deployed ! (another story of MLOps)
I want my model to be deployed ! (another story of MLOps)I want my model to be deployed ! (another story of MLOps)
I want my model to be deployed ! (another story of MLOps)
 
Machine Learning Use Case - Agriculture
Machine Learning Use Case - AgricultureMachine Learning Use Case - Agriculture
Machine Learning Use Case - Agriculture
 
Build and deploy PyTorch models with Azure Machine Learning - Henk - CCDays
Build and deploy PyTorch models with Azure Machine Learning - Henk - CCDaysBuild and deploy PyTorch models with Azure Machine Learning - Henk - CCDays
Build and deploy PyTorch models with Azure Machine Learning - Henk - CCDays
 
Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...
Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...
Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...
 
Train, predict, serve: How to go into production your machine learning model
Train, predict, serve: How to go into production your machine learning modelTrain, predict, serve: How to go into production your machine learning model
Train, predict, serve: How to go into production your machine learning model
 
Kraken at DevCon TLV
Kraken at DevCon TLVKraken at DevCon TLV
Kraken at DevCon TLV
 
Trenowanie i wdrażanie modeli uczenia maszynowego z wykorzystaniem Google Clo...
Trenowanie i wdrażanie modeli uczenia maszynowego z wykorzystaniem Google Clo...Trenowanie i wdrażanie modeli uczenia maszynowego z wykorzystaniem Google Clo...
Trenowanie i wdrażanie modeli uczenia maszynowego z wykorzystaniem Google Clo...
 
How to Train Your Classifier: Create a Serverless Machine Learning System wit...
How to Train Your Classifier: Create a Serverless Machine Learning System wit...How to Train Your Classifier: Create a Serverless Machine Learning System wit...
How to Train Your Classifier: Create a Serverless Machine Learning System wit...
 
Productionizing Machine Learning Pipelines with Databricks and Azure ML
Productionizing Machine Learning Pipelines with Databricks and Azure MLProductionizing Machine Learning Pipelines with Databricks and Azure ML
Productionizing Machine Learning Pipelines with Databricks and Azure ML
 
Unsupervised Aspect Based Sentiment Analysis at Scale
Unsupervised Aspect Based Sentiment Analysis at ScaleUnsupervised Aspect Based Sentiment Analysis at Scale
Unsupervised Aspect Based Sentiment Analysis at Scale
 
Chris O'Brien - Best bits of Azure for Office 365/SharePoint developers
Chris O'Brien - Best bits of Azure for Office 365/SharePoint developersChris O'Brien - Best bits of Azure for Office 365/SharePoint developers
Chris O'Brien - Best bits of Azure for Office 365/SharePoint developers
 
Azure App Services
Azure App ServicesAzure App Services
Azure App Services
 
AWS CloudFormation Intrinsic Functions and Mappings
AWS CloudFormation Intrinsic Functions and Mappings AWS CloudFormation Intrinsic Functions and Mappings
AWS CloudFormation Intrinsic Functions and Mappings
 
ML_Development_with_Sagemaker.pptx
ML_Development_with_Sagemaker.pptxML_Development_with_Sagemaker.pptx
ML_Development_with_Sagemaker.pptx
 
201908 Overview of Automated ML
201908 Overview of Automated ML201908 Overview of Automated ML
201908 Overview of Automated ML
 
Tooling for Machine Learning: AWS Products, Open Source Tools, and DevOps Pra...
Tooling for Machine Learning: AWS Products, Open Source Tools, and DevOps Pra...Tooling for Machine Learning: AWS Products, Open Source Tools, and DevOps Pra...
Tooling for Machine Learning: AWS Products, Open Source Tools, and DevOps Pra...
 
10 things I’ve learnt In the clouds
10 things I’ve learnt In the clouds10 things I’ve learnt In the clouds
10 things I’ve learnt In the clouds
 
Azuresatpn19 - An Introduction To Azure Data Factory
Azuresatpn19 - An Introduction To Azure Data FactoryAzuresatpn19 - An Introduction To Azure Data Factory
Azuresatpn19 - An Introduction To Azure Data Factory
 
AI with Azure Machine Learning
AI with Azure Machine LearningAI with Azure Machine Learning
AI with Azure Machine Learning
 

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
 
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
 
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
 
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
 
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
 
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
 
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

Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionfulawalesam
 
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
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceDelhi Call girls
 
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
 
Data-Analysis for Chicago Crime Data 2023
Data-Analysis for Chicago Crime Data  2023Data-Analysis for Chicago Crime Data  2023
Data-Analysis for Chicago Crime Data 2023ymrp368
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxolyaivanovalion
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Valters Lauzums
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAroojKhan71
 
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
 
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxBPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxMohammedJunaid861692
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxolyaivanovalion
 
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
 
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
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...amitlee9823
 
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
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Researchmichael115558
 

Recently uploaded (20)

Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interaction
 
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
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
 
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
 
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
 
Data-Analysis for Chicago Crime Data 2023
Data-Analysis for Chicago Crime Data  2023Data-Analysis for Chicago Crime Data  2023
Data-Analysis for Chicago Crime Data 2023
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptx
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 
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
 
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxBPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 
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...
 
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
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
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
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 

Deploy Spark model from Azure Databricks to Azure ML

  • 1.
  • 2. Deploy and serve model from Azure Databricks onto Azure Machine Learning - Reema Kuvadia ( Software Engineer 2) - Tao Li (Senior Applied Scientist)
  • 3. Agenda ▪ Model Training and experimenting ▪ Model Deployment ▪ Model Consumption and Azure website deployment
  • 4. Azure Resources Azure Databricks Azure Blob Storage Azure Machine Learning Azure Kubernetes Azure Web Service Azure Databricks is an Apache Spark-based analytics platform optimized for the Microsoft Azure cloud services platform Experiment on Azure Databricks Model training using PySpark Azure Blob storage is a service for storing large amounts of unstructured object data Published model is stored in Azure blob storage Azure machine learning is a cloud-based service used to build, test and deploy predictive analytics solutions based on your data Register the model to Azure Machine Learning Azure Kubernetes Service (AKS) is a managed container orchestration service, based on the open source Kubernetes system, which is available on the Azure public cloud Create model image and create endpoint Microsoft Azure Web Sites is a cloud computing based platform for hosting websites, created and operated by Microsoft. Model serve as Web Service on Azure Consume model using RestAPI endpoint Model Training Model Storing Model Deployment Model Severing Model Consumption
  • 5. Demo 1: Deployment of Azure Resources using ARM Template
  • 6. Session 1: Model Training and Experimenting
  • 7. Introduction to the problem ▪ The current solutions mostly rely on dictionary/vocabulary, regular expression, and rule-based loop up and matching to identify the semantic types. ▪ not robust to dirty and complex data ▪ not generalized to diverse data types. ▪ Problem: Correctly detecting the semantic types of data (column of data) is critical for data science tasks such as data cleaning/normalization, data matching, and data enrichment. Data Type D. James, Kevin Louis, Steven Moring, Thomas V. Beard Name Chicago, Seattle, Tenn, TBA Location 2019-10-12, Oct 12, 2019, 10/12/2019, 20191012 Date
  • 8. Model E2E Flow … Data … App Model Training Experiment on Azure Databricks Model training using PySpark Azure Databricks PySpark Model Packaging Package model using MLeap Publish model to azure blob storage Azure Blob Storage Define Deployment Define model environment and dependencies Prepare Scoring script Visual Studio Code Register the model to Azure Machine Learning Create model image Deploy to azure Kubernetes web service Model Deployment Azure Machine Learning Azure Kubernetes Serve & Consume Model serve as Web Service on Azure Consume model using RestAPI endpoint Azure Web Service
  • 9. Model Architecture and Training ▪ Featurization ▪ Embedding Dataframe lookup in memory ▪ Spark SQL for featurization using UDF (user-defined function) Multi-class Classification using Random Forest ▪ Modeling ▪ ▪ text Web Table: Bing RetroIndex Public Table: Paper Data Customer Table: Demo Data First Name Date Phone John Michael ... Richard 2015-11-19 1-925-226-7368x212 08/15/2015 830-115-4090 ... ... May 27, 2016 (067)681-4908 1. Data Source &Table repository 2. Tabular Data & Features Header Embeddings Character Distributions Word Embeddings Global Statistics Header statistics Feature Extraction (Data) Column Data Column Header Feature Extraction (Header) Label Extraction ... Person .FirstName Calendar .Date Identity.Service .Phone ... Features Labels concatenate Label Cleaning 3. Training and Testing 4. Semantic Type Detection Training Testing Table for scoring ML Model Predicted Type + Confidence Score Location.City: 0.8 NA: 0.6 Calendar.Year: 0.9 Excel Table ...
  • 10. Demo 2: Training the model using Azure Databricks
  • 11. Session 2: Model Deployment
  • 12. Model Deployment ▪ Model training on Azure Databricks. ▪ Package model and publish into Azure Blob Storage ▪ Prerequisites ▪ AML (Azure Machine Learning) Workspace ▪ AKS (Azure Kubernetes Service) Cluster ▪ Azure Machine Learning and Storage SDK ▪ Model Registry Registering a model to store, version, and track metadata about models in your workspace. ▪ Define deployment ▪ Scoring File (named score.py) ▪ Loads the model when the deployed service starts. ▪ Receiving data, passing it to the model, and then returning a response. ▪ AML environment. (software dependencies and libraries) ▪ Deploy the model ▪ Create the image ▪ Config the entry script and environment ▪ Config Runtime (runtime="spark-py") ▪ CPU and Memory ▪ Deploy image as a web app ▪ Deploy the model to AKS cluster ▪ Get model endpoint ▪ Consume the model ▪ Use the model via SDK ▪ Use the model via Endpoints
  • 13. Scoring File (Score.py) ▪ init(): ▪ This function loads the model into a global object. ▪ This function is run only once, when the Docker container start the web service. The entry script receives data submitted to a deployed web service and passes it to the model. It then takes the response returned by the model and returns that to the client. The script contains two functions that load and run the model: def run(input_data): try: data = json.loads(input_data)['data’] features = Featurization_new(data) feature_df = spark.createDataFrame([features,], names) predictions_raw = model.transform(feature_df) predictions = predictions_raw.select("prediction", "features") #Get each scored result predictions = predictions.collect() preds = [str(x['prediction']) for x in predictions] return preds[0] except Exception as e: def init(): global spark global model global word_to_embedding spark = SparkSession.builder.getOrCreate() model_path = Model.get_model_path('semantic_mapping_model') model = PipelineModel.load(model_path) embedding_path = Model.get_model_path('word_to_embedding.pkl') file = open(embedding_path, 'rb') word_to_embedding = pickle.load(file) file.close() ▪ run(input_data): ▪ This function uses the model to predict a value based on the input data. ▪ Inputs and outputs of the run typically use JSON for serialization and deserialization.
  • 14. Demo 3: Model Deployment using Azure Machine Learning
  • 15. Session 3: Model Consumption
  • 16. Model Consumption and Website Deployment ▪ Registration: ▪ To register model we need following: ▪ Path: (string) location of model ▪ Name: (string) model name ▪ Description: (string) that describes the model ▪ Worskapce: (string) name of workspace that we want to consume in webservice. In this script we register the model, create or use existing environment using YAML file. Then deploy model as Webservice on AKS which will create and endpoint, that we consume in the website. name : project_environment dependencies : - python=3.6.2 - pip: - azureml-defaults - scikit-learn - numpy - inference-schema[numpy-support] from azureml.core.model import Model embedding = Model(ws, 'word_to_embedding.pkl') if not embedding: embedding = Model.register(model_path="./model/word_to_embedding.pkl ", model_name="word_to_embedding.pkl", description="Word to embedding", workspacee=ws) ▪ Environment config file: ▪ You can now create and/or use an Environment object when deploying a Webservice. The Environment can have been previously registered with your Workspace, or it will be registered with it as a part of the Webservice deployment.
  • 17. Application Demo Semantic Mapping Automatically detects the correct Attribute Type And can prevent possible human error (due to data input or miss-understanding)
  • 18. Demo 4: Model consumption by creating endpoint in AKS and consuming it using Azure Web Service
  • 19. Summary ▪ Spark APIs we used are: ▪ Spark SQL and UDF (User Defined Functions) for featurization ▪ ▪ Microsoft Azure for making it seamless to integrate with 3rd party platforms
  • 20. References ▪ Databricks ▪ https://docs.microsoft.com/en-us/azure/azure-databricks/quickstart-create-databricks-workspace-resource-manager-template ▪ https://github.com/Azure/azure-quickstart-templates/tree/master/101-databricks-all-in-one-template-for-vnet-injection ▪ Azure Blob Storage ▪ https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-portal ▪ https://github.com/Azure/azure-quickstart-templates/tree/master/101-storage-blob-container ▪ Azure Machine Learning ▪ https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/machine-learning/studio/deploy-with-resource-manager- template.md ▪ https://docs.microsoft.com/en-us/azure/machine-learning/tutorial-1st-experiment-sdk-setup ▪ Azure Website Deployment ▪ https://docs.microsoft.com/en-us/visualstudio/deployment/quickstart-deploy-to-azure?view=vs-2019&viewFallbackFrom=vs- 2019%E2%80%8B
  • 21. Feedback Your feedback is important to us. Don’t forget to rate and review the sessions.