Unable to create managed online endpoint in using azureml python sdk v2

ea0337 10 Reputation points
2024-08-23T15:57:47.46+00:00

Hi All,

My first post here. I am trying to follow the ms-learn tutorials to deploy a model using a managed online endpoint using Azure ml sdk v2.

import uuid

# Create a unique name for the endpoint
online_endpoint_name = "credit-endpoint-" + str(uuid.uuid4())[:8]

from azure.ai.ml.entities import ManagedOnlineEndpoint

# define an online endpoint
endpoint = ManagedOnlineEndpoint(
    name=online_endpoint_name,
    description="this is an online endpoint",
    auth_mode="key",
    tags={
        "training_dataset": "credit_defaults",
    },
)

# create the online endpoint
# expect the endpoint to take approximately 2 minutes.

endpoint = ml_client.online_endpoints.begin_create_or_update(endpoint).result()

I get the following error message:

HttpResponseError: (SubscriptionNotRegistered) Resource provider [N/A] isn't registered with Subscription [N/A]. Please see troubleshooting guide, available here: https://aka.ms/register-resource-provider
Code: SubscriptionNotRegistered
Message: Resource provider [N/A] isn't registered with Subscription [N/A]. Please see troubleshooting guide, available here: https://aka.ms/register-resource-provider

I don't see a service name which is causing this error and unable to proceed. Please suggest how to debug this.

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
2,888 questions
{count} votes

1 answer

Sort by: Most helpful
  1. YutongTie-MSFT 51,611 Reputation points
    2024-08-29T23:05:17.1233333+00:00

    Hello @ea0337

    Thanks for reporting this issue again, we have a workaround right now, please do have a try and let us know how it works.

    Please also add Microsoft.PolicyInsights in addition to Microsoft.Cnd to your Subscription Resource Provider. It should solve the issue at this moment.

    Steps -

    Go to Azure Portal

    Select your Subscription

    Select Settings

    Select Resource Providers

    Make sure you add Microsoft.PolicyInsights and Microsoft.Cnd policies. Refresh and retry deployment.

    User's image

    Please have a try and let us know how it works.

    Regards,

    Yutong

    -Please kindly accept the answer if you feel helpful to support the community, thanks a lot.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.