title | description | services | documentationcenter | author | manager | editor | ms.assetid | ms.service | ms.workload | ms.tgt_pltfrm | ms.devlang | ms.topic | ms.date | ms.author |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Azure Machine Learning Web Services: Deployment and consumption | Microsoft Docs |
Resources for deploying and consuming web services. |
machine-learning |
vDonGlover |
raymondl |
47635376-d1f4-4ea4-a6af-bd1f99f69a69 |
machine-learning |
data-services |
na |
na |
article |
10/12/2016 |
v-donglo |
You can use Azure Machine Learning to deploy machine-learning workflows and models as web services. These web services can then be used to call the machine-learning models from applications over the Internet to do predictions in real time or in batch mode. Because the web services are RESTful, you can call them from various programming languages and platforms, such as .NET and Java, and from applications, such as Excel.
The next sections provide links to walkthroughs, code, and documentation to help get you started.
Machine Learning Studio and the Microsoft Azure Machine Learning Web Services portal help you deploy and manage a web service without writing code.
The following links provide general Information about how to deploy a new web service:
-
For an overview about how to deploy a new web service that's based on Azure Resource Manager, see Deploy a new web service.
-
For a walkthrough about how to deploy a web service, see Deploy an Azure Machine Learning web service.
-
For a full walkthrough about how to create and deploy a web service, see Walkthrough Step 1: Create a Machine Learning workspace.
-
For specific examples that deploy a web service, see:
The Azure Machine Learning resource provider for web services enables deployment and management of web services by using REST API calls. For additional details, see the Machine Learning Web Service (REST) reference.
Azure Machine Learning resource provider for web services enables deployment and management of web services by using PowerShell cmdlets.
To use the cmdlets, you must first sign in to your Azure account from within the PowerShell environment by using the Add-AzureRmAccount cmdlet. If you are unfamiliar with how to call PowerShell commands that are based on Resource Manager, see Using Azure PowerShell with Azure Resource Manager.
To export your predictive experiment, use this sample code. After you create the .exe file from the code, you can type:
C:\<folder>\GetWSD <experiment-url> <workspace-auth-token>
Running the application creates a web service JSON template. To use the template to deploy a web service, you must add the following information:
-
Storage account name and key
You can get the storage account name and key from either the Azure portal or the Azure classic portal.
-
Commitment plan ID
You can get the plan ID from the Azure Machine Learning Web Services portal by signing in and clicking a plan name.
Add them to the JSON template as children of the Properties node at the same level as the MachineLearningWorkspace node.
Here's an example:
"StorageAccount": {
"name": "YourStorageAccountName",
"key": "YourStorageAccountKey"
},
"CommitmentPlan": {
"id": "subscriptions/YouSubscriptionID/resourceGroups/YourResourceGroupID/providers/Microsoft.MachineLearning/commitmentPlans/YourPlanName"
}
See the following articles and sample code for additional details:
- Azure Machine Learning Cmdlets reference on MSDN
- Sample walkthrough on GitHub
You can test your web service from the Azure Machine Learning Web Services portal. This includes testing the Request-Response service (RRS) and Batch Execution service (BES) interfaces.
- Deploy a new web service
- Deploy an Azure Machine Learning web service
- Walkthrough Step 5: Deploy the Azure Machine Learning web service
You can download an Excel template that consumes the web service:
- Consuming an Azure Machine Learning web service from Excel
- Excel add-in for Azure Machine Learning Web Services
Azure Machine Learning Web Services are RESTful APIs. You can consume these APIs from various platforms, such as .NET, Python, R, Java, etc. The Consume page for your web service on the Microsoft Azure Machine Learning Web Services portal has sample code that can help you get started. For more information, see How to consume an Azure Machine Learning web service that has been deployed from a Machine Learning experiment.