Materiały kursów
Materiały / Azure ML (English)
Instrukcja do tego ćwiczeniaPobierz notatnik (.ipynb)

Using the Visual Designer

Important: This exercise assumes you have completed Lab 2A and Lab 2B to create the inference pipeline and deploy it as a real-time endpoint backed by an Azure Container Instance (ACI).

Add code to the cell below to test your predict-diabetes endpoint.

In Azure Machine Learning studio, open the endpoint on the Endpoints page, go to the Consume tab, and copy the Python sample code. It uses the requests library to POST a JSON payload to the endpoint's scoring URI, passing the endpoint's key in the Authorization header. Paste it into the cell below, then run the cell and confirm you get back a predicted diabetes label and probability for each patient observation.

Note: A classic Designer pipeline is deployed as an ACI (or AKS) web service, not as a managed online endpoint. That means the SDK v2 helper ml_client.online_endpoints.invoke(...) does not work here - call the scoring URI directly with requests, as the Consume tab's sample code does. You'll work with genuine managed online endpoints, and with ml_client.online_endpoints.invoke(...), in Lab 7A.

In [ ]: