I have created an Azure Machine Learning Service Pipeline which i am invoking externally using its rest endpoint. But i also need to monitor its run , whether it got completed or failed, periodically. Is there a methodinside a machine learning pipeline's rest endpoint, which i can hit to check its run status? I have tried the steps mentioned in the link here https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/machine-learning-pipelines/pipeline-batch-scoring/pipeline-batch-scoring.ipynb
2 Answers
For getting status of run, you can use REST APIs described here https://github.com/Azure/azure-rest-api-specs/tree/master/specification/machinelearningservices/data-plane
Specifically you need https://github.com/Azure/azure-rest-api-specs/blob/master/specification/machinelearningservices/data-plane/Microsoft.MachineLearningServices/preview/2019-08-01/runHistory.json
use this call to get run information including status:
/history/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/experiments/{experimentName}/runs/{runId}/details
Thanks Prashant! The following endpoint works.
https://{location}.experiments.azureml.net/history/v1.0/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/experiments/{experimentName}/runs/{runId}
If it helps someone searching about this, here is some more information.
- Use the above endpoint with GET Method and Authorization Bearer Access Token
To obtain the access token, do the following.
curl -X POST https://login.microsoftonline.com/{your-tenant-id}/oauth2/token
-d "grant_type=client_credentials&resource=https%3A%2F%2Fmanagement.azure.com%2F&client_id={your-client-id}&client_secret={your-client-secret}" \
For more information, follow How to Manage REST - Create, run, and delete Azure ML resources using REST