Machine Learning Studio (classic) Web Services: Deployment and consumption

APPLIES TO: Applies to.Machine Learning Studio (classic) Does not apply to.Azure Machine Learning

Important

Support for Machine Learning Studio (classic) will end on 31 August 2024. We recommend you transition to Azure Machine Learning by that date.

Beginning 1 December 2021, you will not be able to create new Machine Learning Studio (classic) resources. Through 31 August 2024, you can continue to use the existing Machine Learning Studio (classic) resources.

ML Studio (classic) documentation is being retired and may not be updated in the future.

You can use Machine Learning Studio (classic) 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 Machine Learning Studio (classic)

The Studio (classic) portal and the 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 Machine Learning Studio (classic) resource provider for web services enables deployment and management of web services by using REST API calls. For more information, see the Machine Learning Web Service (REST) reference.

With PowerShell cmdlets

The Machine Learning Studio (classic) 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 Connect-AzAccount 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 the Azure portal.

  • Commitment plan ID

    You can get the plan ID from the 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:

Consume the web services

From the Machine Learning Web Services UI (Testing)

You can test your web service from the 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

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 Machine Learning Web Services portal has sample code that can help you get started. For more information, see How to consume a Machine Learning Web service.