Skip to content

Latest commit

 

History

History
97 lines (68 loc) · 6.02 KB

machine-learning-deploy-consume-web-service-guide.md

File metadata and controls

97 lines (68 loc) · 6.02 KB
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

Azure Machine Learning Web Services: Deployment and consumption

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.

Deploy a web service

With Azure Machine Learning Studio

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:

With web services resource provider APIs (Azure Resource Manager APIs)

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.

With PowerShell cmdlets

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:

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:

Consume the web services

From the Azure Machine Learning Web Services UI (Testing)

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.

From Excel

You can download an Excel template that consumes the web service:

From a REST-based client

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.