Uso automatizado de
Machine Learning en
Azure Machine
Learning
@CONOSUR.TECH
@CONOSUR.TECH
Uso automatizado de
Machine Learning en
Azure Machine
Learning
@CONOSUR.TECH
• Azure Machine Learning
• Tutorial: Predict automobile price with
the designer
• Tutorial: Deploy a machine learning
model with the designer
• Tutorial: Get started with Azure Machine
Learning in your development environment
• How Azure Machine Learning works:
Architecture and concepts
• MLOps with Azure ML
• Azure DataBricks, Notebooks
@CONOSUR.TECH
¡MUCHAS GRACIAS!
@CONOSUR.TECH
¿QUIÉN SOY?
Bruno Capuano
Innovation Lead
Microsoft MVP AI
https://www.linkedin.com/in/elbruno/
@elbruno
@CONOSUR.TECH
Intro to
Machine Learning
@CONOSUR.TECH
SQL DB
Cosmos DB
Datawarehouse
Data lake
Blob storage
… Prepare Data Build & Train Deploy
Machine Learning Process
@CONOSUR.TECH
Comment Toxic? (Sentiment)
==RUDE== Dude, you are rude … 1
== OK! == IM GOING TO VANDALIZE … 1
I also found use of the word "humanists” confusing … 0
Oooooh thank you Mr. DietLime … 0
Wikipedia detox data at https://figshare.com/articles/Wikipedia_Talk_Labels_Personal_Attacks/4054689
Features (input) Label (output)
Sentiment Analysis
@CONOSUR.TECH
Is this A or B? Is this a toxic comment?
Yes or no
Sentiment analysis explained
Example
Comment Toxic? (Sentiment)
==RUDE== Dude, you are rude … 1
== OK! == IM GOING TO VANDALIZE … 1
I also found use of the word "humanists” confusing … 0
Oooooh thank you Mr. DietLime … 0
Important concepts: Data
Prepare Your Data
Prepare Your Data
Text Featurizer
Featurized Text
[0.76, 0.65, 0.44, …]
[0.98, 0.43, 0.54, …]
[0.35, 0.73, 0.46, …]
[0.39, 0, 0.75, …]
Example
Text
==RUDE== Dude, you are rude …
== OK! == IM GOING TO VANDALIZE …
I also found use of the word "humanists” …
Oooooh thank you Mr. DietLime …
Important concepts: Transformer
Build & Train
Example
Estimator
Comment Toxic? (Sentiment)
==RUDE== Dude, you … 1
== OK! == IM GOING … 1
I also found use of the … 0
Oooooh thank you Mr. … 0
Important concepts: Trainer
Comment
==RUDE== Dude, you …
Prediction Function
Predicted Label – Toxic? (Sentiment)
1
Run
Example
Important concepts: Model
Azure ML Hello World !
MakeMagicHappen();
https://www.avanade.com/AI
@CONOSUR.TECH
DATA SCIENCE
PROJECTS
@CONOSUR.TECH
Machine Learning on Azure
Domain Specific Pretrained Models
To reduce time to market
Azure
Databricks
Machine
Learning VMs
Popular Frameworks
To build machine learning and deep learning solutions TensorFlowPyTorch ONNX
Azure Machine
Learning
LanguageSpeech
…
SearchVision
Productive Services
To empower data science and development teams
Powerful Hardware
To accelerate deep learning
Scikit-Learn
PyCharm Jupyter
Familiar Data Science Tools
To simplify model development Visual Studio Code Command line
CPU GPU FPGA
From the Intelligent Cloud to the Intelligent Edge@CONOSUR.TECH
@CONOSUR.TECH
Building blocks for a Data Science Project
Data
sources
Classical ML
Deep learning
Build and train
models
Experimentation
and pipelines
Hyperparameter
tuning
DevOps for data
scienceDeployment
@CONOSUR.TECH
Azure ML
Automated Machine Learning
@CONOSUR.TECH
How much is the taxi fare for 1 passenger going from Burlington to Toronto?
Automated Machine Learning
@CONOSUR.TECH
Criterion
Loss
Min Samples Split
Min Samples Leaf
XYZ
Parameter 1
Parameter 2
Parameter 3
Parameter 4
…
Distance
Trip time
Car type
Passengers
Time of day
…
Gradient Boosted
Nearest Neighbors
SGD
Bayesian Regression
LGBM
…
Distance Gradient Boosted
Model
Car type
Passengers
Getting started w/machine learning can be hard
Which algorithm? Which parameters?Which features?
Getting started with ML can be
hard
@CONOSUR.TECH
N Neighbors
Weights
Metric
P
ZYX
Criterion
Loss
Min Samples Split
Min Samples Leaf
XYZ
Which algorithm? Which parameters?Which features?
Distance
Trip time
Car type
Passengers
Time of day
…
Gradient Boosted
Nearest Neighbors
SGD
Bayesian Regression
LGBM
…
Nearest Neighbors
Model
Iterate
Gradient BoostedDistance
Car brand
Year of make
Car type
Passengers
Trip time
Getting started w/machine learning can be hardGetting started with ML can be
hard
@CONOSUR.TECH
Which algorithm? Which parameters?Which features?
Iterate
Getting started w/machine learning can be hardGetting started with ML can be
hard
@CONOSUR.TECH
25%40%70%
25%
95%
25% 25%
25%
25%
40%
40%
40%
40%
70%
70%
70%Enter data
Define goals
Apply constraints
Input Intelligently test multiple models in parallel
Optimized model
95%
AutoML accelerates model
development
@CONOSUR.TECH
70%95% Feature importance
Distance
Trip time
Car type
Passengers
Time of day
0 1
Model B (70%)
Distance
0 1
Trip time
Car type
Passengers
Time of day
Feature importance Model A (95%)
ML.NET accelerates model development
with model explainability
AutoML accelerates model
development
@CONOSUR.TECH
DevOps for Data Science
MLOps
@CONOSUR.TECH
Prepare
Data
Register and
Manage Model
Train &
Test Model
Build
Image
…
Build model
(your favorite IDE)
Deploy Service
Monitor Model
Prepare Experiment Deploy
DevOps loop for data science
@CONOSUR.TECH
DevOps loop for data science
01010100101001011101101001001001011
01010010001000111101001010101001010
01010100101001011101101001001001011
01010010001000111101001010101001010
00101001011101101001001001011010100
10001000111101001010101001010010101
00101001011101101001
Prepare
Data
Prepare
Register and
Manage Model
Build
Image
…
Build model
(your favorite IDE)
Deploy Service
Monitor Model
Train &
Test Model
@CONOSUR.TECH
Model Management in detail
Create/Retrain Model
Enable DevOps with full CI/CD
integration with VSTS
Register Model
Track model versions with a
central model registry
Monitor
Oversea deployments through
Azure AppInsights
@CONOSUR.TECH
Experimentation
Use leaderboards, side by side run
comparison and model selection
Conduct a hyperparameter search on
traditional ML or DNN
Leverage service-side capture of run
metrics, output logs and models
Manage training jobs locally, scaled-up or
scaled-out
95
%
80%
75%
90%
85%
@CONOSUR.TECH
Azure Machine Learning Pipelines
@CONOSUR.TECH
Azure Machine Learning Pipelines
Prepare data Build & train models Deploy & predict
Data storage
locations
Data ingestion
Data Preparation Model building & training Model deployment
Normalization
Transformation
Validation
Featurization
Hyper-parameter tuning
Automatic model selection
Model testing
Model validation
Deployment
Batch scoring
@CONOSUR.TECH
Prepare data Build & train models Deploy & predict
Data storage
locations
Data ingestion
Data Preparation Model building & training Model deployment
Normalization
Transformation
Validation
Featurization
Hyper-parameter tuning
Automatic model selection
Model testing
Model validation
Deployment
Batch scoring
Normalization
Transformation
Validation
Featurization
Hyper-parameter tuning
Automatic model selection
Model testing Testing error
Azure Machine Learning Pipelines
@CONOSUR.TECH
Prepare data Build & train models Deploy & predict
Data storage
locations
Data ingestion
Data Preparation Model building & training Model deployment
Normalization
Transformation
Validation
Featurization
Hyper-parameter tuning
Automatic model selection
Model testing
Model validation
Deployment
Batch scoring
Normalization
Transformation
Validation
Featurization
Hyper-parameter tuning
Automatic model selection
Model testing Testing errorModel testing
Model validation
Deployment
Batch scoring
Error
resolved
Azure Machine Learning Pipelines
@CONOSUR.TECH
Azure Machine Learning Pipelines with
new data
Prepare data Build & train models Deploy & predict
Data storage
locations
Data ingestion
Data Preparation Model building & training Model deployment
Normalization
Transformation
Validation
Featurization
Hyper-parameter tuning
Automatic model selection
Model testing
Model validation
Deployment
Batch scoring
Normalization
Transformation
Validation
Featurization
Hyper-parameter tuning
Automatic model selection
Model testing
Model validation
New
data
Deployment
Batch scoring
@CONOSUR.TECH
Advantages of Azure ML Pipelines
Unattended runs
Schedule a few steps to run in parallel or
in sequence to focus on other tasks while
your pipeline runs
Mixed and diverse compute
Use multiple pipelines that are reliably
coordinated across heterogeneous and
scalable computes and storages
Reusability
Create templates of pipelines for specific
scenarios such as retraining and batch
scoring
Tracking and versioning
Name and version your data sources,
inputs and outputs with the pipelines SDK
@CONOSUR.TECH
Support for Open source frameworks
@CONOSUR.TECH
Popular Frameworks
Use your favorite machine learning frameworks without getting locked into one framework
ONNX
Community project created by Facebook and Microsoft
Use the best tool for the job. Train in one framework and
transfer to another for inference
TensorFlow PyTorch Scikit-Learn
MXNet Chainer Keras
Frameworks
Create
Native
support
Converters
Services
Azure Custom
Vision Service
Native
support
Other Devices
(iOS, etc)
ML.NE
T
Azure
Windows Server 2019 VM
Azure Machine Learning services
Ubuntu VM
Deploy
Windows Devices
ONNX Model
Native
support
Converters
@CONOSUR.TECH
Deployment
@CONOSUR.TECH
Flexible Deployment
Deploy and manage models on intelligent cloud and edge
Train & deploy Train & deploy
Deploy
Model optimization for cloud & edge
Manage models in production
Capture model telemetry
Retrain models
@CONOSUR.TECH
Deploy Azure ML models at scale
Azure Machine Learning Service
Azure Machine
Learning
Experimentation
Cognitive
Services
External
Model
Model Registry
Register Model
Cloud Service
Heavy Edge
Light Edge
Image
Registry
Create &
Register Image
Your IDE
Scoring File
Image
Registry
Deployment & Model
Monitoring
@CONOSUR.TECH
Deployments to Compute Targets

2020 10 22 AI Fundamentals - Azure Machine Learning

  • 1.
    Uso automatizado de MachineLearning en Azure Machine Learning @CONOSUR.TECH
  • 2.
    @CONOSUR.TECH Uso automatizado de MachineLearning en Azure Machine Learning
  • 3.
    @CONOSUR.TECH • Azure MachineLearning • Tutorial: Predict automobile price with the designer • Tutorial: Deploy a machine learning model with the designer • Tutorial: Get started with Azure Machine Learning in your development environment • How Azure Machine Learning works: Architecture and concepts • MLOps with Azure ML • Azure DataBricks, Notebooks
  • 4.
  • 5.
    @CONOSUR.TECH ¿QUIÉN SOY? Bruno Capuano InnovationLead Microsoft MVP AI https://www.linkedin.com/in/elbruno/ @elbruno
  • 6.
  • 7.
    @CONOSUR.TECH SQL DB Cosmos DB Datawarehouse Datalake Blob storage … Prepare Data Build & Train Deploy Machine Learning Process
  • 8.
    @CONOSUR.TECH Comment Toxic? (Sentiment) ==RUDE==Dude, you are rude … 1 == OK! == IM GOING TO VANDALIZE … 1 I also found use of the word "humanists” confusing … 0 Oooooh thank you Mr. DietLime … 0 Wikipedia detox data at https://figshare.com/articles/Wikipedia_Talk_Labels_Personal_Attacks/4054689 Features (input) Label (output) Sentiment Analysis
  • 9.
    @CONOSUR.TECH Is this Aor B? Is this a toxic comment? Yes or no Sentiment analysis explained
  • 10.
    Example Comment Toxic? (Sentiment) ==RUDE==Dude, you are rude … 1 == OK! == IM GOING TO VANDALIZE … 1 I also found use of the word "humanists” confusing … 0 Oooooh thank you Mr. DietLime … 0 Important concepts: Data Prepare Your Data
  • 11.
    Prepare Your Data TextFeaturizer Featurized Text [0.76, 0.65, 0.44, …] [0.98, 0.43, 0.54, …] [0.35, 0.73, 0.46, …] [0.39, 0, 0.75, …] Example Text ==RUDE== Dude, you are rude … == OK! == IM GOING TO VANDALIZE … I also found use of the word "humanists” … Oooooh thank you Mr. DietLime … Important concepts: Transformer
  • 12.
    Build & Train Example Estimator CommentToxic? (Sentiment) ==RUDE== Dude, you … 1 == OK! == IM GOING … 1 I also found use of the … 0 Oooooh thank you Mr. … 0 Important concepts: Trainer
  • 13.
    Comment ==RUDE== Dude, you… Prediction Function Predicted Label – Toxic? (Sentiment) 1 Run Example Important concepts: Model
  • 14.
    Azure ML HelloWorld ! MakeMagicHappen(); https://www.avanade.com/AI
  • 15.
  • 16.
    @CONOSUR.TECH Machine Learning onAzure Domain Specific Pretrained Models To reduce time to market Azure Databricks Machine Learning VMs Popular Frameworks To build machine learning and deep learning solutions TensorFlowPyTorch ONNX Azure Machine Learning LanguageSpeech … SearchVision Productive Services To empower data science and development teams Powerful Hardware To accelerate deep learning Scikit-Learn PyCharm Jupyter Familiar Data Science Tools To simplify model development Visual Studio Code Command line CPU GPU FPGA From the Intelligent Cloud to the Intelligent Edge@CONOSUR.TECH
  • 17.
    @CONOSUR.TECH Building blocks fora Data Science Project Data sources Classical ML Deep learning Build and train models Experimentation and pipelines Hyperparameter tuning DevOps for data scienceDeployment
  • 18.
  • 19.
    @CONOSUR.TECH How much isthe taxi fare for 1 passenger going from Burlington to Toronto? Automated Machine Learning
  • 20.
    @CONOSUR.TECH Criterion Loss Min Samples Split MinSamples Leaf XYZ Parameter 1 Parameter 2 Parameter 3 Parameter 4 … Distance Trip time Car type Passengers Time of day … Gradient Boosted Nearest Neighbors SGD Bayesian Regression LGBM … Distance Gradient Boosted Model Car type Passengers Getting started w/machine learning can be hard Which algorithm? Which parameters?Which features? Getting started with ML can be hard
  • 21.
    @CONOSUR.TECH N Neighbors Weights Metric P ZYX Criterion Loss Min SamplesSplit Min Samples Leaf XYZ Which algorithm? Which parameters?Which features? Distance Trip time Car type Passengers Time of day … Gradient Boosted Nearest Neighbors SGD Bayesian Regression LGBM … Nearest Neighbors Model Iterate Gradient BoostedDistance Car brand Year of make Car type Passengers Trip time Getting started w/machine learning can be hardGetting started with ML can be hard
  • 22.
    @CONOSUR.TECH Which algorithm? Whichparameters?Which features? Iterate Getting started w/machine learning can be hardGetting started with ML can be hard
  • 23.
    @CONOSUR.TECH 25%40%70% 25% 95% 25% 25% 25% 25% 40% 40% 40% 40% 70% 70% 70%Enter data Definegoals Apply constraints Input Intelligently test multiple models in parallel Optimized model 95% AutoML accelerates model development
  • 24.
    @CONOSUR.TECH 70%95% Feature importance Distance Triptime Car type Passengers Time of day 0 1 Model B (70%) Distance 0 1 Trip time Car type Passengers Time of day Feature importance Model A (95%) ML.NET accelerates model development with model explainability AutoML accelerates model development
  • 25.
  • 26.
    @CONOSUR.TECH Prepare Data Register and Manage Model Train& Test Model Build Image … Build model (your favorite IDE) Deploy Service Monitor Model Prepare Experiment Deploy DevOps loop for data science
  • 27.
    @CONOSUR.TECH DevOps loop fordata science 01010100101001011101101001001001011 01010010001000111101001010101001010 01010100101001011101101001001001011 01010010001000111101001010101001010 00101001011101101001001001011010100 10001000111101001010101001010010101 00101001011101101001 Prepare Data Prepare Register and Manage Model Build Image … Build model (your favorite IDE) Deploy Service Monitor Model Train & Test Model
  • 28.
    @CONOSUR.TECH Model Management indetail Create/Retrain Model Enable DevOps with full CI/CD integration with VSTS Register Model Track model versions with a central model registry Monitor Oversea deployments through Azure AppInsights
  • 29.
    @CONOSUR.TECH Experimentation Use leaderboards, sideby side run comparison and model selection Conduct a hyperparameter search on traditional ML or DNN Leverage service-side capture of run metrics, output logs and models Manage training jobs locally, scaled-up or scaled-out 95 % 80% 75% 90% 85%
  • 30.
  • 31.
    @CONOSUR.TECH Azure Machine LearningPipelines Prepare data Build & train models Deploy & predict Data storage locations Data ingestion Data Preparation Model building & training Model deployment Normalization Transformation Validation Featurization Hyper-parameter tuning Automatic model selection Model testing Model validation Deployment Batch scoring
  • 32.
    @CONOSUR.TECH Prepare data Build& train models Deploy & predict Data storage locations Data ingestion Data Preparation Model building & training Model deployment Normalization Transformation Validation Featurization Hyper-parameter tuning Automatic model selection Model testing Model validation Deployment Batch scoring Normalization Transformation Validation Featurization Hyper-parameter tuning Automatic model selection Model testing Testing error Azure Machine Learning Pipelines
  • 33.
    @CONOSUR.TECH Prepare data Build& train models Deploy & predict Data storage locations Data ingestion Data Preparation Model building & training Model deployment Normalization Transformation Validation Featurization Hyper-parameter tuning Automatic model selection Model testing Model validation Deployment Batch scoring Normalization Transformation Validation Featurization Hyper-parameter tuning Automatic model selection Model testing Testing errorModel testing Model validation Deployment Batch scoring Error resolved Azure Machine Learning Pipelines
  • 34.
    @CONOSUR.TECH Azure Machine LearningPipelines with new data Prepare data Build & train models Deploy & predict Data storage locations Data ingestion Data Preparation Model building & training Model deployment Normalization Transformation Validation Featurization Hyper-parameter tuning Automatic model selection Model testing Model validation Deployment Batch scoring Normalization Transformation Validation Featurization Hyper-parameter tuning Automatic model selection Model testing Model validation New data Deployment Batch scoring
  • 35.
    @CONOSUR.TECH Advantages of AzureML Pipelines Unattended runs Schedule a few steps to run in parallel or in sequence to focus on other tasks while your pipeline runs Mixed and diverse compute Use multiple pipelines that are reliably coordinated across heterogeneous and scalable computes and storages Reusability Create templates of pipelines for specific scenarios such as retraining and batch scoring Tracking and versioning Name and version your data sources, inputs and outputs with the pipelines SDK
  • 36.
  • 37.
    @CONOSUR.TECH Popular Frameworks Use yourfavorite machine learning frameworks without getting locked into one framework ONNX Community project created by Facebook and Microsoft Use the best tool for the job. Train in one framework and transfer to another for inference TensorFlow PyTorch Scikit-Learn MXNet Chainer Keras
  • 38.
    Frameworks Create Native support Converters Services Azure Custom Vision Service Native support OtherDevices (iOS, etc) ML.NE T Azure Windows Server 2019 VM Azure Machine Learning services Ubuntu VM Deploy Windows Devices ONNX Model Native support Converters
  • 39.
  • 40.
    @CONOSUR.TECH Flexible Deployment Deploy andmanage models on intelligent cloud and edge Train & deploy Train & deploy Deploy Model optimization for cloud & edge Manage models in production Capture model telemetry Retrain models
  • 41.
    @CONOSUR.TECH Deploy Azure MLmodels at scale Azure Machine Learning Service Azure Machine Learning Experimentation Cognitive Services External Model Model Registry Register Model Cloud Service Heavy Edge Light Edge Image Registry Create & Register Image Your IDE Scoring File Image Registry Deployment & Model Monitoring
  • 42.