SlideShare a Scribd company logo
Henk Boelman
Cloud Advocate @ Microsoft
Build and Deploy
PyTorch Models with
Azure Machine
Learning
HenkBoelman.com @hboelman
Azure Machine Learning studio
A fully-managed cloud service that enables you to easily build, deploy, and share
predictive analytics solutions.
What is Azure Machine Learning?
Set of Azure
Cloud Services
Python SDK
Azure CLI
Web interface
✓Prepare Data
✓Build Models
✓Train Models
✓Manage Models
✓Track
Experiments
✓Deploy Models
That enables
you to:
Is it Marge or Homer or .. or ..?
Simpson Lego dataset
https://github.com/hnky/dataset-lego-figures
Sophisticated pretrained models
To simplify solution development
Azure
Databricks
Machine Learning
VMs
Popular frameworks
To build advanced deep learning solutions TensorFlow KerasPytorch Onnx
Azure
Machine Learning
LanguageSpeech
…
Azure
Search
Vision
On-premises Cloud Edge
Productive services
To empower data science and development teams
Powerful infrastructure
To accelerate deep learning
Flexible deployment
To deploy and manage models on intelligent cloud and edge
Machine Learning on Azure
Cognitive Services
Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning - Henk Boelman (Microsoft)
Prepare
your environment
Experiment
with your model & data
Deploy
Your model into production
Step 1: Prepare your environment
Setup your environment
VS Code Python SDKAzure Portal
Create a workspace
ws = Workspace.create(
name='<NAME>',
subscription_id='<SUBSCRIPTION ID>',
resource_group='<RESOURCE GROUP>',
location='westeurope')
ws.write_config()
ws = Workspace.from_config()
Create a workspace
Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning - Henk Boelman (Microsoft)
Datasets – registered, known data sets
Experiments – Training runs
Models – Registered, versioned models
Endpoints:
Real-time Endpoints – Deployed model endpoints
Pipeline Endpoints – Training workflows
Compute – Managed compute
Datastores – Connections to data
Azure Machine Learning Service
Create Compute
cfg = AmlCompute.provisioning_configuration(
vm_size='STANDARD_NC6',
min_nodes=1,
max_nodes=6)
cc = ComputeTarget.create(ws, '<NAME>', cfg)
Create a workspace Create compute
Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning - Henk Boelman (Microsoft)
Demo: Setup your workspace
Create a workspace Create compute Setup storage
Step 1
Prepare your environment
Create a workspace Create compute Setup storage
Step 2: Experiment with your model & data
Create an experiment
exp = Experiment(workspace=ws, name=“<ExperimentName>”)
Create an
Experiment
Create a training file
Create an
Experiment
Create a
training file
Create an estimator
params = {'--data-folder': ws.get_default_datastore().as_mount()}
estimator = TensorFlow(
source_directory = script_folder,
script_params = params,
compute_target = computeCluster,
entry_script = 'train.py’,
use_gpu = True,
conda_packages = ['scikit-learn','keras','opencv’],
framework_version='1.10')
Create an
Experiment
Create a
training file
Create an
estimator
Submit the experiment to the cluster
run = exp.submit(estimator)
RunDetails(run).show()
Create an
Experiment
Create a
training file
Submit to the
AI cluster
Create an
estimator
Create an
Experiment
Create a
training file
Submit to the
AI cluster
Create an
estimator
Demo: Creating and run an experiment
Azure Notebook
Compute Target
Experiment Docker Image
Data store
1. Snapshot folder and
send to experiment
2. create docker image
3. Deploy docker
and snapshot to
compute
4. Mount datastore
to compute
6. Stream
stdout,
logs,
metrics 5. Launch the script
7. Copy over
outputs
Register the model
model = run.register_model(
model_name='SimpsonsAI',
model_path='outputs')
Create an
Experiment
Create a
training file
Submit to the
AI cluster
Create an
estimator
Register the
model
Create an
Experiment
Create a
training file
Submit to the
AI cluster
Create an
estimator
Register the
model
Demo: Register and test the model
Step 2
Experiment with your model & data
Step 3: Deploy your model into production
AMLS to deploy
The Model Score.py Environment file
Docker Image
Score.py
%%writefile score.py
from azureml.core.model import Model
def init():
model_root = Model.get_model_path('MyModel’)
loaded_model = model_from_json(loaded_model_json)
loaded_model.load_weights(model_file_h5)
def run(raw_data):
url = json.loads(raw_data)['url’]
image_data = cv2.resize(image_data,(96,96))
predicted_labels = loaded_model.predict(data1)
return json.dumps(predicted_labels)
Environment File
from azureml.core.runconfig import CondaDependencies
cd = CondaDependencies.create()
cd.add_conda_package('keras==2.2.2')
cd.add_conda_package('opencv')
cd.add_tensorflow_conda_package()
cd.save_to_file(base_directory='./', conda_file_path='myenv.yml')
Inference config
inference_config = InferenceConfig(
runtime= "python",
entry_script="score.py",
conda_file="myenv.yml"
)
Deployment using AMLS
Deploy to ACI
aciconfig = AciWebservice.deploy_configuration(
cpu_cores = 1,
memory_gb = 2)
service = Model.deploy(workspace=ws,
name='simpsons-aci',
models=[model],
inference_config=inference_config,
deployment_config=aciconfig)
Demo: Deploy to ACI
Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning - Henk Boelman (Microsoft)
@hboelman
github.com/hnky
henkboelman.com
Thank you!
Read more on: henkboelman.com

More Related Content

What's hot (15)

Google Cloud Platform, Compute Engine, and App Engine
Google Cloud Platform, Compute Engine, and App EngineGoogle Cloud Platform, Compute Engine, and App Engine
Google Cloud Platform, Compute Engine, and App Engine
Csaba Toth
 
Node.js on Windows Azure
Node.js on Windows AzureNode.js on Windows Azure
Node.js on Windows Azure
Neil Mackenzie
 
CloudFork
CloudForkCloudFork
CloudFork
ESUG
 
Shelly cloud & heroku & engineyard. Pros & Cons
Shelly cloud & heroku & engineyard. Pros & ConsShelly cloud & heroku & engineyard. Pros & Cons
Shelly cloud & heroku & engineyard. Pros & Cons
Giedrius Rimkus
 
Reloca - Project as Code approach and MVP demonstration
Reloca - Project as Code approach and MVP demonstrationReloca - Project as Code approach and MVP demonstration
Reloca - Project as Code approach and MVP demonstration
Fabienne Mariën
 
Shakr - Container CI/CD with Google Cloud Platform
Shakr - Container CI/CD with Google Cloud PlatformShakr - Container CI/CD with Google Cloud Platform
Shakr - Container CI/CD with Google Cloud Platform
Minku Lee
 
Deep Learning for Developers (October 2017)
Deep Learning for Developers (October 2017)Deep Learning for Developers (October 2017)
Deep Learning for Developers (October 2017)
Julien SIMON
 
No sq ls-biggest-lie_sql-never-went-away_martin-esmann
No sq ls-biggest-lie_sql-never-went-away_martin-esmannNo sq ls-biggest-lie_sql-never-went-away_martin-esmann
No sq ls-biggest-lie_sql-never-went-away_martin-esmann
Martin Esmann
 
運用CNTK 實作深度學習物件辨識 Deep Learning based Object Detection with Microsoft Cogniti...
運用CNTK 實作深度學習物件辨識 Deep Learning based Object Detection with Microsoft Cogniti...運用CNTK 實作深度學習物件辨識 Deep Learning based Object Detection with Microsoft Cogniti...
運用CNTK 實作深度學習物件辨識 Deep Learning based Object Detection with Microsoft Cogniti...
Herman Wu
 
Configuring Your First Hadoop Cluster On EC2
Configuring Your First Hadoop Cluster On EC2Configuring Your First Hadoop Cluster On EC2
Configuring Your First Hadoop Cluster On EC2
benjaminwootton
 
Azure Data Explorer deep dive - review 04.2020
Azure Data Explorer deep dive - review 04.2020Azure Data Explorer deep dive - review 04.2020
Azure Data Explorer deep dive - review 04.2020
Riccardo Zamana
 
Building Reactive Applications With Akka And Java
Building Reactive Applications With Akka And JavaBuilding Reactive Applications With Akka And Java
Building Reactive Applications With Akka And Java
Tu Pham
 
Google Cloud Platform - Eric Johnson, Joe Selman - ManageIQ Design Summit 2016
Google Cloud Platform - Eric Johnson, Joe Selman - ManageIQ Design Summit 2016Google Cloud Platform - Eric Johnson, Joe Selman - ManageIQ Design Summit 2016
Google Cloud Platform - Eric Johnson, Joe Selman - ManageIQ Design Summit 2016
ManageIQ
 
Hands on Compute Engine
Hands on Compute EngineHands on Compute Engine
Hands on Compute Engine
Simon Su
 
Beyond EC2 and S3
Beyond EC2 and S3Beyond EC2 and S3
Beyond EC2 and S3
Lorenzo Aiello
 
Google Cloud Platform, Compute Engine, and App Engine
Google Cloud Platform, Compute Engine, and App EngineGoogle Cloud Platform, Compute Engine, and App Engine
Google Cloud Platform, Compute Engine, and App Engine
Csaba Toth
 
Node.js on Windows Azure
Node.js on Windows AzureNode.js on Windows Azure
Node.js on Windows Azure
Neil Mackenzie
 
CloudFork
CloudForkCloudFork
CloudFork
ESUG
 
Shelly cloud & heroku & engineyard. Pros & Cons
Shelly cloud & heroku & engineyard. Pros & ConsShelly cloud & heroku & engineyard. Pros & Cons
Shelly cloud & heroku & engineyard. Pros & Cons
Giedrius Rimkus
 
Reloca - Project as Code approach and MVP demonstration
Reloca - Project as Code approach and MVP demonstrationReloca - Project as Code approach and MVP demonstration
Reloca - Project as Code approach and MVP demonstration
Fabienne Mariën
 
Shakr - Container CI/CD with Google Cloud Platform
Shakr - Container CI/CD with Google Cloud PlatformShakr - Container CI/CD with Google Cloud Platform
Shakr - Container CI/CD with Google Cloud Platform
Minku Lee
 
Deep Learning for Developers (October 2017)
Deep Learning for Developers (October 2017)Deep Learning for Developers (October 2017)
Deep Learning for Developers (October 2017)
Julien SIMON
 
No sq ls-biggest-lie_sql-never-went-away_martin-esmann
No sq ls-biggest-lie_sql-never-went-away_martin-esmannNo sq ls-biggest-lie_sql-never-went-away_martin-esmann
No sq ls-biggest-lie_sql-never-went-away_martin-esmann
Martin Esmann
 
運用CNTK 實作深度學習物件辨識 Deep Learning based Object Detection with Microsoft Cogniti...
運用CNTK 實作深度學習物件辨識 Deep Learning based Object Detection with Microsoft Cogniti...運用CNTK 實作深度學習物件辨識 Deep Learning based Object Detection with Microsoft Cogniti...
運用CNTK 實作深度學習物件辨識 Deep Learning based Object Detection with Microsoft Cogniti...
Herman Wu
 
Configuring Your First Hadoop Cluster On EC2
Configuring Your First Hadoop Cluster On EC2Configuring Your First Hadoop Cluster On EC2
Configuring Your First Hadoop Cluster On EC2
benjaminwootton
 
Azure Data Explorer deep dive - review 04.2020
Azure Data Explorer deep dive - review 04.2020Azure Data Explorer deep dive - review 04.2020
Azure Data Explorer deep dive - review 04.2020
Riccardo Zamana
 
Building Reactive Applications With Akka And Java
Building Reactive Applications With Akka And JavaBuilding Reactive Applications With Akka And Java
Building Reactive Applications With Akka And Java
Tu Pham
 
Google Cloud Platform - Eric Johnson, Joe Selman - ManageIQ Design Summit 2016
Google Cloud Platform - Eric Johnson, Joe Selman - ManageIQ Design Summit 2016Google Cloud Platform - Eric Johnson, Joe Selman - ManageIQ Design Summit 2016
Google Cloud Platform - Eric Johnson, Joe Selman - ManageIQ Design Summit 2016
ManageIQ
 
Hands on Compute Engine
Hands on Compute EngineHands on Compute Engine
Hands on Compute Engine
Simon Su
 

Similar to Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning - Henk Boelman (Microsoft) (20)

Azure machine learning service
Azure machine learning serviceAzure machine learning service
Azure machine learning service
Ruth Yakubu
 
DEVOPS AND MACHINE LEARNING
DEVOPS AND MACHINE LEARNINGDEVOPS AND MACHINE LEARNING
DEVOPS AND MACHINE LEARNING
CodeOps Technologies LLP
 
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
 
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
Aaron (Ari) Bornstein
 
Dataminds - ML in Production
Dataminds - ML in ProductionDataminds - ML in Production
Dataminds - ML in Production
Nathan Bijnens
 
Big Data Advanced Analytics on Microsoft Azure 201904
Big Data Advanced Analytics on Microsoft Azure 201904Big Data Advanced Analytics on Microsoft Azure 201904
Big Data Advanced Analytics on Microsoft Azure 201904
Mark Tabladillo
 
Viktor Tsykunov: Azure Machine Learning Service
Viktor Tsykunov: Azure Machine Learning ServiceViktor Tsykunov: Azure Machine Learning Service
Viktor Tsykunov: Azure Machine Learning Service
Lviv Startup Club
 
AML_service.pptx
AML_service.pptxAML_service.pptx
AML_service.pptx
Abhishek878239
 
201906 04 Overview of Automated ML June 2019
201906 04 Overview of Automated ML June 2019201906 04 Overview of Automated ML June 2019
201906 04 Overview of Automated ML June 2019
Mark Tabladillo
 
What startups need to know about NLP, AI, & ML on the cloud.
What startups need to know about NLP, AI, & ML on the cloud.What startups need to know about NLP, AI, & ML on the cloud.
What startups need to know about NLP, AI, & ML on the cloud.
Aaron (Ari) Bornstein
 
MCT Summit Azure automated Machine Learning
MCT Summit Azure automated Machine Learning MCT Summit Azure automated Machine Learning
MCT Summit Azure automated Machine Learning
Usama Wahab Khan Cloud, Data and AI
 
SCasia 2018 MSFT hands on session for Azure Batch AI
SCasia 2018 MSFT hands on session for Azure Batch AISCasia 2018 MSFT hands on session for Azure Batch AI
SCasia 2018 MSFT hands on session for Azure Batch AI
Hiroshi Tanaka
 
Getting Started with Visual Studio Tools for AI
Getting Started with Visual Studio Tools for AIGetting Started with Visual Studio Tools for AI
Getting Started with Visual Studio Tools for AI
Microsoft Tech Community
 
201908 Overview of Automated ML
201908 Overview of Automated ML201908 Overview of Automated ML
201908 Overview of Automated ML
Mark Tabladillo
 
Deeplearning and dev ops azure
Deeplearning and dev ops azureDeeplearning and dev ops azure
Deeplearning and dev ops azure
Vishwas N
 
AI day2021 approcci DevOps per il rilascio continuo di modelli di machine lea...
AI day2021 approcci DevOps per il rilascio continuo di modelli di machine lea...AI day2021 approcci DevOps per il rilascio continuo di modelli di machine lea...
AI day2021 approcci DevOps per il rilascio continuo di modelli di machine lea...
Igor Antonacci
 
AI @ Microsoft, How we do it and how you can too!
AI @ Microsoft, How we do it and how you can too!AI @ Microsoft, How we do it and how you can too!
AI @ Microsoft, How we do it and how you can too!
Microsoft Tech Community
 
Deploy and Serve Model from Azure Databricks onto Azure Machine Learning
Deploy and Serve Model from Azure Databricks onto Azure Machine LearningDeploy and Serve Model from Azure Databricks onto Azure Machine Learning
Deploy and Serve Model from Azure Databricks onto Azure Machine Learning
Databricks
 
2020 10 22 AI Fundamentals - Azure Machine Learning
2020 10 22 AI Fundamentals - Azure Machine Learning2020 10 22 AI Fundamentals - Azure Machine Learning
2020 10 22 AI Fundamentals - Azure Machine Learning
Bruno Capuano
 
Designing Artificial Intelligence
Designing Artificial IntelligenceDesigning Artificial Intelligence
Designing Artificial Intelligence
David Chou
 
Azure machine learning service
Azure machine learning serviceAzure machine learning service
Azure machine learning service
Ruth 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
 
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
Aaron (Ari) Bornstein
 
Dataminds - ML in Production
Dataminds - ML in ProductionDataminds - ML in Production
Dataminds - ML in Production
Nathan Bijnens
 
Big Data Advanced Analytics on Microsoft Azure 201904
Big Data Advanced Analytics on Microsoft Azure 201904Big Data Advanced Analytics on Microsoft Azure 201904
Big Data Advanced Analytics on Microsoft Azure 201904
Mark Tabladillo
 
Viktor Tsykunov: Azure Machine Learning Service
Viktor Tsykunov: Azure Machine Learning ServiceViktor Tsykunov: Azure Machine Learning Service
Viktor Tsykunov: Azure Machine Learning Service
Lviv Startup Club
 
201906 04 Overview of Automated ML June 2019
201906 04 Overview of Automated ML June 2019201906 04 Overview of Automated ML June 2019
201906 04 Overview of Automated ML June 2019
Mark Tabladillo
 
What startups need to know about NLP, AI, & ML on the cloud.
What startups need to know about NLP, AI, & ML on the cloud.What startups need to know about NLP, AI, & ML on the cloud.
What startups need to know about NLP, AI, & ML on the cloud.
Aaron (Ari) Bornstein
 
SCasia 2018 MSFT hands on session for Azure Batch AI
SCasia 2018 MSFT hands on session for Azure Batch AISCasia 2018 MSFT hands on session for Azure Batch AI
SCasia 2018 MSFT hands on session for Azure Batch AI
Hiroshi Tanaka
 
Getting Started with Visual Studio Tools for AI
Getting Started with Visual Studio Tools for AIGetting Started with Visual Studio Tools for AI
Getting Started with Visual Studio Tools for AI
Microsoft Tech Community
 
201908 Overview of Automated ML
201908 Overview of Automated ML201908 Overview of Automated ML
201908 Overview of Automated ML
Mark Tabladillo
 
Deeplearning and dev ops azure
Deeplearning and dev ops azureDeeplearning and dev ops azure
Deeplearning and dev ops azure
Vishwas N
 
AI day2021 approcci DevOps per il rilascio continuo di modelli di machine lea...
AI day2021 approcci DevOps per il rilascio continuo di modelli di machine lea...AI day2021 approcci DevOps per il rilascio continuo di modelli di machine lea...
AI day2021 approcci DevOps per il rilascio continuo di modelli di machine lea...
Igor Antonacci
 
AI @ Microsoft, How we do it and how you can too!
AI @ Microsoft, How we do it and how you can too!AI @ Microsoft, How we do it and how you can too!
AI @ Microsoft, How we do it and how you can too!
Microsoft Tech Community
 
Deploy and Serve Model from Azure Databricks onto Azure Machine Learning
Deploy and Serve Model from Azure Databricks onto Azure Machine LearningDeploy and Serve Model from Azure Databricks onto Azure Machine Learning
Deploy and Serve Model from Azure Databricks onto Azure Machine Learning
Databricks
 
2020 10 22 AI Fundamentals - Azure Machine Learning
2020 10 22 AI Fundamentals - Azure Machine Learning2020 10 22 AI Fundamentals - Azure Machine Learning
2020 10 22 AI Fundamentals - Azure Machine Learning
Bruno Capuano
 
Designing Artificial Intelligence
Designing Artificial IntelligenceDesigning Artificial Intelligence
Designing Artificial Intelligence
David Chou
 
Ad

More from Shift Conference (20)

Shift Remote: AI: How Does Face Recognition Work (ars futura)
Shift Remote: AI: How Does Face Recognition Work  (ars futura)Shift Remote: AI: How Does Face Recognition Work  (ars futura)
Shift Remote: AI: How Does Face Recognition Work (ars futura)
Shift Conference
 
Shift Remote: AI: Behind the scenes development in an AI company - Matija Ili...
Shift Remote: AI: Behind the scenes development in an AI company - Matija Ili...Shift Remote: AI: Behind the scenes development in an AI company - Matija Ili...
Shift Remote: AI: Behind the scenes development in an AI company - Matija Ili...
Shift Conference
 
Shift Remote: AI: Smarter AI with analytical graph databases - Victor Lee (Ti...
Shift Remote: AI: Smarter AI with analytical graph databases - Victor Lee (Ti...Shift Remote: AI: Smarter AI with analytical graph databases - Victor Lee (Ti...
Shift Remote: AI: Smarter AI with analytical graph databases - Victor Lee (Ti...
Shift Conference
 
Shift Remote: DevOps: Devops with Azure Devops and Github - Juarez Junior (Mi...
Shift Remote: DevOps: Devops with Azure Devops and Github - Juarez Junior (Mi...Shift Remote: DevOps: Devops with Azure Devops and Github - Juarez Junior (Mi...
Shift Remote: DevOps: Devops with Azure Devops and Github - Juarez Junior (Mi...
Shift Conference
 
Shift Remote: DevOps: Autodesks research into digital twins for AEC - Kean W...
Shift Remote: DevOps: Autodesks research into digital twins for AEC -  Kean W...Shift Remote: DevOps: Autodesks research into digital twins for AEC -  Kean W...
Shift Remote: DevOps: Autodesks research into digital twins for AEC - Kean W...
Shift Conference
 
Shift Remote: DevOps: When metrics are not enough, and everyone is on-call - ...
Shift Remote: DevOps: When metrics are not enough, and everyone is on-call - ...Shift Remote: DevOps: When metrics are not enough, and everyone is on-call - ...
Shift Remote: DevOps: When metrics are not enough, and everyone is on-call - ...
Shift Conference
 
Shift Remote: DevOps: Modern incident management with opsgenie - Kristijan L...
Shift Remote: DevOps: Modern incident management with opsgenie -  Kristijan L...Shift Remote: DevOps: Modern incident management with opsgenie -  Kristijan L...
Shift Remote: DevOps: Modern incident management with opsgenie - Kristijan L...
Shift Conference
 
Shift Remote: DevOps: Gitlab ci hands-on experience - Ivan Rimac (Barrage)
Shift Remote: DevOps: Gitlab ci hands-on experience - Ivan Rimac (Barrage)Shift Remote: DevOps: Gitlab ci hands-on experience - Ivan Rimac (Barrage)
Shift Remote: DevOps: Gitlab ci hands-on experience - Ivan Rimac (Barrage)
Shift Conference
 
Shift Remote: DevOps: DevOps Heroes - Adding Advanced Automation to your Tool...
Shift Remote: DevOps: DevOps Heroes - Adding Advanced Automation to your Tool...Shift Remote: DevOps: DevOps Heroes - Adding Advanced Automation to your Tool...
Shift Remote: DevOps: DevOps Heroes - Adding Advanced Automation to your Tool...
Shift Conference
 
Shift Remote: DevOps: An (Un)expected Journey - Zeljko Margeta (RBA)
Shift Remote: DevOps: An (Un)expected Journey - Zeljko Margeta (RBA)Shift Remote: DevOps: An (Un)expected Journey - Zeljko Margeta (RBA)
Shift Remote: DevOps: An (Un)expected Journey - Zeljko Margeta (RBA)
Shift Conference
 
Shift Remote: Game Dev - Localising Mobile Games - Marta Kunic (Nanobit)
Shift Remote: Game Dev - Localising Mobile Games - Marta Kunic (Nanobit)Shift Remote: Game Dev - Localising Mobile Games - Marta Kunic (Nanobit)
Shift Remote: Game Dev - Localising Mobile Games - Marta Kunic (Nanobit)
Shift Conference
 
Shift Remote: Game Dev - Challenges Introducing Open Source to the Games Indu...
Shift Remote: Game Dev - Challenges Introducing Open Source to the Games Indu...Shift Remote: Game Dev - Challenges Introducing Open Source to the Games Indu...
Shift Remote: Game Dev - Challenges Introducing Open Source to the Games Indu...
Shift Conference
 
Shift Remote: Game Dev - Ghost in the Machine: Authorial Voice in System Desi...
Shift Remote: Game Dev - Ghost in the Machine: Authorial Voice in System Desi...Shift Remote: Game Dev - Ghost in the Machine: Authorial Voice in System Desi...
Shift Remote: Game Dev - Ghost in the Machine: Authorial Voice in System Desi...
Shift Conference
 
Shift Remote: Game Dev - Building Better Worlds with Game Culturalization - K...
Shift Remote: Game Dev - Building Better Worlds with Game Culturalization - K...Shift Remote: Game Dev - Building Better Worlds with Game Culturalization - K...
Shift Remote: Game Dev - Building Better Worlds with Game Culturalization - K...
Shift Conference
 
Shift Remote: Game Dev - Open Match: An Open Source Matchmaking Framework - J...
Shift Remote: Game Dev - Open Match: An Open Source Matchmaking Framework - J...Shift Remote: Game Dev - Open Match: An Open Source Matchmaking Framework - J...
Shift Remote: Game Dev - Open Match: An Open Source Matchmaking Framework - J...
Shift Conference
 
Shift Remote: Game Dev - Designing Inside the Box - Fernando Reyes Medina (34...
Shift Remote: Game Dev - Designing Inside the Box - Fernando Reyes Medina (34...Shift Remote: Game Dev - Designing Inside the Box - Fernando Reyes Medina (34...
Shift Remote: Game Dev - Designing Inside the Box - Fernando Reyes Medina (34...
Shift Conference
 
Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...
Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...
Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...
Shift Conference
 
Shift Remote: Mobile - Introduction to MotionLayout on Android - Denis Fodor ...
Shift Remote: Mobile - Introduction to MotionLayout on Android - Denis Fodor ...Shift Remote: Mobile - Introduction to MotionLayout on Android - Denis Fodor ...
Shift Remote: Mobile - Introduction to MotionLayout on Android - Denis Fodor ...
Shift Conference
 
Shift Remote: Mobile - Devops-ify your life with Github Actions - Nicola Cort...
Shift Remote: Mobile - Devops-ify your life with Github Actions - Nicola Cort...Shift Remote: Mobile - Devops-ify your life with Github Actions - Nicola Cort...
Shift Remote: Mobile - Devops-ify your life with Github Actions - Nicola Cort...
Shift Conference
 
Shift Remote: WEB - GraphQL and React – Quick Start - Dubravko Bogovic (Infobip)
Shift Remote: WEB - GraphQL and React – Quick Start - Dubravko Bogovic (Infobip)Shift Remote: WEB - GraphQL and React – Quick Start - Dubravko Bogovic (Infobip)
Shift Remote: WEB - GraphQL and React – Quick Start - Dubravko Bogovic (Infobip)
Shift Conference
 
Shift Remote: AI: How Does Face Recognition Work (ars futura)
Shift Remote: AI: How Does Face Recognition Work  (ars futura)Shift Remote: AI: How Does Face Recognition Work  (ars futura)
Shift Remote: AI: How Does Face Recognition Work (ars futura)
Shift Conference
 
Shift Remote: AI: Behind the scenes development in an AI company - Matija Ili...
Shift Remote: AI: Behind the scenes development in an AI company - Matija Ili...Shift Remote: AI: Behind the scenes development in an AI company - Matija Ili...
Shift Remote: AI: Behind the scenes development in an AI company - Matija Ili...
Shift Conference
 
Shift Remote: AI: Smarter AI with analytical graph databases - Victor Lee (Ti...
Shift Remote: AI: Smarter AI with analytical graph databases - Victor Lee (Ti...Shift Remote: AI: Smarter AI with analytical graph databases - Victor Lee (Ti...
Shift Remote: AI: Smarter AI with analytical graph databases - Victor Lee (Ti...
Shift Conference
 
Shift Remote: DevOps: Devops with Azure Devops and Github - Juarez Junior (Mi...
Shift Remote: DevOps: Devops with Azure Devops and Github - Juarez Junior (Mi...Shift Remote: DevOps: Devops with Azure Devops and Github - Juarez Junior (Mi...
Shift Remote: DevOps: Devops with Azure Devops and Github - Juarez Junior (Mi...
Shift Conference
 
Shift Remote: DevOps: Autodesks research into digital twins for AEC - Kean W...
Shift Remote: DevOps: Autodesks research into digital twins for AEC -  Kean W...Shift Remote: DevOps: Autodesks research into digital twins for AEC -  Kean W...
Shift Remote: DevOps: Autodesks research into digital twins for AEC - Kean W...
Shift Conference
 
Shift Remote: DevOps: When metrics are not enough, and everyone is on-call - ...
Shift Remote: DevOps: When metrics are not enough, and everyone is on-call - ...Shift Remote: DevOps: When metrics are not enough, and everyone is on-call - ...
Shift Remote: DevOps: When metrics are not enough, and everyone is on-call - ...
Shift Conference
 
Shift Remote: DevOps: Modern incident management with opsgenie - Kristijan L...
Shift Remote: DevOps: Modern incident management with opsgenie -  Kristijan L...Shift Remote: DevOps: Modern incident management with opsgenie -  Kristijan L...
Shift Remote: DevOps: Modern incident management with opsgenie - Kristijan L...
Shift Conference
 
Shift Remote: DevOps: Gitlab ci hands-on experience - Ivan Rimac (Barrage)
Shift Remote: DevOps: Gitlab ci hands-on experience - Ivan Rimac (Barrage)Shift Remote: DevOps: Gitlab ci hands-on experience - Ivan Rimac (Barrage)
Shift Remote: DevOps: Gitlab ci hands-on experience - Ivan Rimac (Barrage)
Shift Conference
 
Shift Remote: DevOps: DevOps Heroes - Adding Advanced Automation to your Tool...
Shift Remote: DevOps: DevOps Heroes - Adding Advanced Automation to your Tool...Shift Remote: DevOps: DevOps Heroes - Adding Advanced Automation to your Tool...
Shift Remote: DevOps: DevOps Heroes - Adding Advanced Automation to your Tool...
Shift Conference
 
Shift Remote: DevOps: An (Un)expected Journey - Zeljko Margeta (RBA)
Shift Remote: DevOps: An (Un)expected Journey - Zeljko Margeta (RBA)Shift Remote: DevOps: An (Un)expected Journey - Zeljko Margeta (RBA)
Shift Remote: DevOps: An (Un)expected Journey - Zeljko Margeta (RBA)
Shift Conference
 
Shift Remote: Game Dev - Localising Mobile Games - Marta Kunic (Nanobit)
Shift Remote: Game Dev - Localising Mobile Games - Marta Kunic (Nanobit)Shift Remote: Game Dev - Localising Mobile Games - Marta Kunic (Nanobit)
Shift Remote: Game Dev - Localising Mobile Games - Marta Kunic (Nanobit)
Shift Conference
 
Shift Remote: Game Dev - Challenges Introducing Open Source to the Games Indu...
Shift Remote: Game Dev - Challenges Introducing Open Source to the Games Indu...Shift Remote: Game Dev - Challenges Introducing Open Source to the Games Indu...
Shift Remote: Game Dev - Challenges Introducing Open Source to the Games Indu...
Shift Conference
 
Shift Remote: Game Dev - Ghost in the Machine: Authorial Voice in System Desi...
Shift Remote: Game Dev - Ghost in the Machine: Authorial Voice in System Desi...Shift Remote: Game Dev - Ghost in the Machine: Authorial Voice in System Desi...
Shift Remote: Game Dev - Ghost in the Machine: Authorial Voice in System Desi...
Shift Conference
 
Shift Remote: Game Dev - Building Better Worlds with Game Culturalization - K...
Shift Remote: Game Dev - Building Better Worlds with Game Culturalization - K...Shift Remote: Game Dev - Building Better Worlds with Game Culturalization - K...
Shift Remote: Game Dev - Building Better Worlds with Game Culturalization - K...
Shift Conference
 
Shift Remote: Game Dev - Open Match: An Open Source Matchmaking Framework - J...
Shift Remote: Game Dev - Open Match: An Open Source Matchmaking Framework - J...Shift Remote: Game Dev - Open Match: An Open Source Matchmaking Framework - J...
Shift Remote: Game Dev - Open Match: An Open Source Matchmaking Framework - J...
Shift Conference
 
Shift Remote: Game Dev - Designing Inside the Box - Fernando Reyes Medina (34...
Shift Remote: Game Dev - Designing Inside the Box - Fernando Reyes Medina (34...Shift Remote: Game Dev - Designing Inside the Box - Fernando Reyes Medina (34...
Shift Remote: Game Dev - Designing Inside the Box - Fernando Reyes Medina (34...
Shift Conference
 
Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...
Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...
Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...
Shift Conference
 
Shift Remote: Mobile - Introduction to MotionLayout on Android - Denis Fodor ...
Shift Remote: Mobile - Introduction to MotionLayout on Android - Denis Fodor ...Shift Remote: Mobile - Introduction to MotionLayout on Android - Denis Fodor ...
Shift Remote: Mobile - Introduction to MotionLayout on Android - Denis Fodor ...
Shift Conference
 
Shift Remote: Mobile - Devops-ify your life with Github Actions - Nicola Cort...
Shift Remote: Mobile - Devops-ify your life with Github Actions - Nicola Cort...Shift Remote: Mobile - Devops-ify your life with Github Actions - Nicola Cort...
Shift Remote: Mobile - Devops-ify your life with Github Actions - Nicola Cort...
Shift Conference
 
Shift Remote: WEB - GraphQL and React – Quick Start - Dubravko Bogovic (Infobip)
Shift Remote: WEB - GraphQL and React – Quick Start - Dubravko Bogovic (Infobip)Shift Remote: WEB - GraphQL and React – Quick Start - Dubravko Bogovic (Infobip)
Shift Remote: WEB - GraphQL and React – Quick Start - Dubravko Bogovic (Infobip)
Shift Conference
 
Ad

Recently uploaded (17)

Vigilanti-Cura-Protecting-the-Faith.pptx
Vigilanti-Cura-Protecting-the-Faith.pptxVigilanti-Cura-Protecting-the-Faith.pptx
Vigilanti-Cura-Protecting-the-Faith.pptx
secretarysocom
 
Internet_of_Things_Presentation_by-Humera.pptx
Internet_of_Things_Presentation_by-Humera.pptxInternet_of_Things_Presentation_by-Humera.pptx
Internet_of_Things_Presentation_by-Humera.pptx
cshumerabashir
 
Inter-Mirifica-Navigating-Media-in-the-Modern-World.pptx
Inter-Mirifica-Navigating-Media-in-the-Modern-World.pptxInter-Mirifica-Navigating-Media-in-the-Modern-World.pptx
Inter-Mirifica-Navigating-Media-in-the-Modern-World.pptx
secretarysocom
 
How to Make Money as a Cam Model – Tips, Tools & Real Talk
How to Make Money as a Cam Model – Tips, Tools & Real TalkHow to Make Money as a Cam Model – Tips, Tools & Real Talk
How to Make Money as a Cam Model – Tips, Tools & Real Talk
Cam Sites Expert
 
3D Graphics an introduction and details .pptx
3D Graphics an introduction and details .pptx3D Graphics an introduction and details .pptx
3D Graphics an introduction and details .pptx
islamicknowledge5224
 
Cloud Computing - iCloud by Hamza Anwaar .pptx
Cloud Computing - iCloud by Hamza Anwaar .pptxCloud Computing - iCloud by Hamza Anwaar .pptx
Cloud Computing - iCloud by Hamza Anwaar .pptx
islamicknowledge5224
 
ARTIFICIAL INTELLIGENCE.pptx2565567765676
ARTIFICIAL INTELLIGENCE.pptx2565567765676ARTIFICIAL INTELLIGENCE.pptx2565567765676
ARTIFICIAL INTELLIGENCE.pptx2565567765676
areebaimtiazpmas
 
What to Expect When Hiring Shopify Development Services_ A Technical Walkthro...
What to Expect When Hiring Shopify Development Services_ A Technical Walkthro...What to Expect When Hiring Shopify Development Services_ A Technical Walkthro...
What to Expect When Hiring Shopify Development Services_ A Technical Walkthro...
CartCoders
 
MOBILE PHONE DATA presentation with all necessary details
MOBILE PHONE DATA presentation with all necessary detailsMOBILE PHONE DATA presentation with all necessary details
MOBILE PHONE DATA presentation with all necessary details
benamorraj
 
Networking_Essentials_version_3.0_-_Module_7.pptx
Networking_Essentials_version_3.0_-_Module_7.pptxNetworking_Essentials_version_3.0_-_Module_7.pptx
Networking_Essentials_version_3.0_-_Module_7.pptx
elestirmen
 
Google_Cloud_Computing_Fundamentals.pptx
Google_Cloud_Computing_Fundamentals.pptxGoogle_Cloud_Computing_Fundamentals.pptx
Google_Cloud_Computing_Fundamentals.pptx
ektadangwal2005
 
ICP -2 Review – What It Is, and How to Participate and Provide Your Feedback
ICP -2 Review – What It Is, and How to Participate and Provide Your FeedbackICP -2 Review – What It Is, and How to Participate and Provide Your Feedback
ICP -2 Review – What It Is, and How to Participate and Provide Your Feedback
APNIC
 
Darley - BSides Nairobi (2025-06-07) Epochalypse 2038 - Time is Not on Our Si...
Darley - BSides Nairobi (2025-06-07) Epochalypse 2038 - Time is Not on Our Si...Darley - BSides Nairobi (2025-06-07) Epochalypse 2038 - Time is Not on Our Si...
Darley - BSides Nairobi (2025-06-07) Epochalypse 2038 - Time is Not on Our Si...
treyka
 
Predicting Site Quality Google Patent US9767157B2 - Behzad Hussain.pdf
Predicting Site Quality Google Patent US9767157B2 - Behzad Hussain.pdfPredicting Site Quality Google Patent US9767157B2 - Behzad Hussain.pdf
Predicting Site Quality Google Patent US9767157B2 - Behzad Hussain.pdf
Behzad Hussain
 
UV_Unwrapping_Lecture_with_Figures.pptx presentation for lecture of animation
UV_Unwrapping_Lecture_with_Figures.pptx presentation for lecture of animationUV_Unwrapping_Lecture_with_Figures.pptx presentation for lecture of animation
UV_Unwrapping_Lecture_with_Figures.pptx presentation for lecture of animation
17218
 
最新版西班牙加泰罗尼亚国际大学毕业证(UIC毕业证书)原版定制
最新版西班牙加泰罗尼亚国际大学毕业证(UIC毕业证书)原版定制最新版西班牙加泰罗尼亚国际大学毕业证(UIC毕业证书)原版定制
最新版西班牙加泰罗尼亚国际大学毕业证(UIC毕业证书)原版定制
Taqyea
 
10 Latest Technologies and Their Benefits to End.pptx
10 Latest Technologies and Their Benefits to End.pptx10 Latest Technologies and Their Benefits to End.pptx
10 Latest Technologies and Their Benefits to End.pptx
EphraimOOghodero
 
Vigilanti-Cura-Protecting-the-Faith.pptx
Vigilanti-Cura-Protecting-the-Faith.pptxVigilanti-Cura-Protecting-the-Faith.pptx
Vigilanti-Cura-Protecting-the-Faith.pptx
secretarysocom
 
Internet_of_Things_Presentation_by-Humera.pptx
Internet_of_Things_Presentation_by-Humera.pptxInternet_of_Things_Presentation_by-Humera.pptx
Internet_of_Things_Presentation_by-Humera.pptx
cshumerabashir
 
Inter-Mirifica-Navigating-Media-in-the-Modern-World.pptx
Inter-Mirifica-Navigating-Media-in-the-Modern-World.pptxInter-Mirifica-Navigating-Media-in-the-Modern-World.pptx
Inter-Mirifica-Navigating-Media-in-the-Modern-World.pptx
secretarysocom
 
How to Make Money as a Cam Model – Tips, Tools & Real Talk
How to Make Money as a Cam Model – Tips, Tools & Real TalkHow to Make Money as a Cam Model – Tips, Tools & Real Talk
How to Make Money as a Cam Model – Tips, Tools & Real Talk
Cam Sites Expert
 
3D Graphics an introduction and details .pptx
3D Graphics an introduction and details .pptx3D Graphics an introduction and details .pptx
3D Graphics an introduction and details .pptx
islamicknowledge5224
 
Cloud Computing - iCloud by Hamza Anwaar .pptx
Cloud Computing - iCloud by Hamza Anwaar .pptxCloud Computing - iCloud by Hamza Anwaar .pptx
Cloud Computing - iCloud by Hamza Anwaar .pptx
islamicknowledge5224
 
ARTIFICIAL INTELLIGENCE.pptx2565567765676
ARTIFICIAL INTELLIGENCE.pptx2565567765676ARTIFICIAL INTELLIGENCE.pptx2565567765676
ARTIFICIAL INTELLIGENCE.pptx2565567765676
areebaimtiazpmas
 
What to Expect When Hiring Shopify Development Services_ A Technical Walkthro...
What to Expect When Hiring Shopify Development Services_ A Technical Walkthro...What to Expect When Hiring Shopify Development Services_ A Technical Walkthro...
What to Expect When Hiring Shopify Development Services_ A Technical Walkthro...
CartCoders
 
MOBILE PHONE DATA presentation with all necessary details
MOBILE PHONE DATA presentation with all necessary detailsMOBILE PHONE DATA presentation with all necessary details
MOBILE PHONE DATA presentation with all necessary details
benamorraj
 
Networking_Essentials_version_3.0_-_Module_7.pptx
Networking_Essentials_version_3.0_-_Module_7.pptxNetworking_Essentials_version_3.0_-_Module_7.pptx
Networking_Essentials_version_3.0_-_Module_7.pptx
elestirmen
 
Google_Cloud_Computing_Fundamentals.pptx
Google_Cloud_Computing_Fundamentals.pptxGoogle_Cloud_Computing_Fundamentals.pptx
Google_Cloud_Computing_Fundamentals.pptx
ektadangwal2005
 
ICP -2 Review – What It Is, and How to Participate and Provide Your Feedback
ICP -2 Review – What It Is, and How to Participate and Provide Your FeedbackICP -2 Review – What It Is, and How to Participate and Provide Your Feedback
ICP -2 Review – What It Is, and How to Participate and Provide Your Feedback
APNIC
 
Darley - BSides Nairobi (2025-06-07) Epochalypse 2038 - Time is Not on Our Si...
Darley - BSides Nairobi (2025-06-07) Epochalypse 2038 - Time is Not on Our Si...Darley - BSides Nairobi (2025-06-07) Epochalypse 2038 - Time is Not on Our Si...
Darley - BSides Nairobi (2025-06-07) Epochalypse 2038 - Time is Not on Our Si...
treyka
 
Predicting Site Quality Google Patent US9767157B2 - Behzad Hussain.pdf
Predicting Site Quality Google Patent US9767157B2 - Behzad Hussain.pdfPredicting Site Quality Google Patent US9767157B2 - Behzad Hussain.pdf
Predicting Site Quality Google Patent US9767157B2 - Behzad Hussain.pdf
Behzad Hussain
 
UV_Unwrapping_Lecture_with_Figures.pptx presentation for lecture of animation
UV_Unwrapping_Lecture_with_Figures.pptx presentation for lecture of animationUV_Unwrapping_Lecture_with_Figures.pptx presentation for lecture of animation
UV_Unwrapping_Lecture_with_Figures.pptx presentation for lecture of animation
17218
 
最新版西班牙加泰罗尼亚国际大学毕业证(UIC毕业证书)原版定制
最新版西班牙加泰罗尼亚国际大学毕业证(UIC毕业证书)原版定制最新版西班牙加泰罗尼亚国际大学毕业证(UIC毕业证书)原版定制
最新版西班牙加泰罗尼亚国际大学毕业证(UIC毕业证书)原版定制
Taqyea
 
10 Latest Technologies and Their Benefits to End.pptx
10 Latest Technologies and Their Benefits to End.pptx10 Latest Technologies and Their Benefits to End.pptx
10 Latest Technologies and Their Benefits to End.pptx
EphraimOOghodero
 

Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning - Henk Boelman (Microsoft)

  • 1. Henk Boelman Cloud Advocate @ Microsoft Build and Deploy PyTorch Models with Azure Machine Learning HenkBoelman.com @hboelman
  • 2. Azure Machine Learning studio A fully-managed cloud service that enables you to easily build, deploy, and share predictive analytics solutions.
  • 3. What is Azure Machine Learning? Set of Azure Cloud Services Python SDK Azure CLI Web interface ✓Prepare Data ✓Build Models ✓Train Models ✓Manage Models ✓Track Experiments ✓Deploy Models That enables you to:
  • 4. Is it Marge or Homer or .. or ..?
  • 6. Sophisticated pretrained models To simplify solution development Azure Databricks Machine Learning VMs Popular frameworks To build advanced deep learning solutions TensorFlow KerasPytorch Onnx Azure Machine Learning LanguageSpeech … Azure Search Vision On-premises Cloud Edge Productive services To empower data science and development teams Powerful infrastructure To accelerate deep learning Flexible deployment To deploy and manage models on intelligent cloud and edge Machine Learning on Azure Cognitive Services
  • 8. Prepare your environment Experiment with your model & data Deploy Your model into production
  • 9. Step 1: Prepare your environment
  • 10. Setup your environment VS Code Python SDKAzure Portal
  • 11. Create a workspace ws = Workspace.create( name='<NAME>', subscription_id='<SUBSCRIPTION ID>', resource_group='<RESOURCE GROUP>', location='westeurope') ws.write_config() ws = Workspace.from_config() Create a workspace
  • 13. Datasets – registered, known data sets Experiments – Training runs Models – Registered, versioned models Endpoints: Real-time Endpoints – Deployed model endpoints Pipeline Endpoints – Training workflows Compute – Managed compute Datastores – Connections to data Azure Machine Learning Service
  • 14. Create Compute cfg = AmlCompute.provisioning_configuration( vm_size='STANDARD_NC6', min_nodes=1, max_nodes=6) cc = ComputeTarget.create(ws, '<NAME>', cfg) Create a workspace Create compute
  • 16. Demo: Setup your workspace Create a workspace Create compute Setup storage
  • 17. Step 1 Prepare your environment Create a workspace Create compute Setup storage
  • 18. Step 2: Experiment with your model & data
  • 19. Create an experiment exp = Experiment(workspace=ws, name=“<ExperimentName>”) Create an Experiment
  • 20. Create a training file Create an Experiment Create a training file
  • 21. Create an estimator params = {'--data-folder': ws.get_default_datastore().as_mount()} estimator = TensorFlow( source_directory = script_folder, script_params = params, compute_target = computeCluster, entry_script = 'train.py’, use_gpu = True, conda_packages = ['scikit-learn','keras','opencv’], framework_version='1.10') Create an Experiment Create a training file Create an estimator
  • 22. Submit the experiment to the cluster run = exp.submit(estimator) RunDetails(run).show() Create an Experiment Create a training file Submit to the AI cluster Create an estimator
  • 23. Create an Experiment Create a training file Submit to the AI cluster Create an estimator Demo: Creating and run an experiment
  • 24. Azure Notebook Compute Target Experiment Docker Image Data store 1. Snapshot folder and send to experiment 2. create docker image 3. Deploy docker and snapshot to compute 4. Mount datastore to compute 6. Stream stdout, logs, metrics 5. Launch the script 7. Copy over outputs
  • 25. Register the model model = run.register_model( model_name='SimpsonsAI', model_path='outputs') Create an Experiment Create a training file Submit to the AI cluster Create an estimator Register the model
  • 26. Create an Experiment Create a training file Submit to the AI cluster Create an estimator Register the model Demo: Register and test the model
  • 27. Step 2 Experiment with your model & data
  • 28. Step 3: Deploy your model into production
  • 29. AMLS to deploy The Model Score.py Environment file Docker Image
  • 30. Score.py %%writefile score.py from azureml.core.model import Model def init(): model_root = Model.get_model_path('MyModel’) loaded_model = model_from_json(loaded_model_json) loaded_model.load_weights(model_file_h5) def run(raw_data): url = json.loads(raw_data)['url’] image_data = cv2.resize(image_data,(96,96)) predicted_labels = loaded_model.predict(data1) return json.dumps(predicted_labels)
  • 31. Environment File from azureml.core.runconfig import CondaDependencies cd = CondaDependencies.create() cd.add_conda_package('keras==2.2.2') cd.add_conda_package('opencv') cd.add_tensorflow_conda_package() cd.save_to_file(base_directory='./', conda_file_path='myenv.yml')
  • 32. Inference config inference_config = InferenceConfig( runtime= "python", entry_script="score.py", conda_file="myenv.yml" )
  • 34. Deploy to ACI aciconfig = AciWebservice.deploy_configuration( cpu_cores = 1, memory_gb = 2) service = Model.deploy(workspace=ws, name='simpsons-aci', models=[model], inference_config=inference_config, deployment_config=aciconfig)