我正在尝试创建端点推理以将模型部署到 azure 机器学习工作区中。我使用下面的 cli 命令来部署模型,但失败并出现以下错误
(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,
我已经注册了 Microsoft.MachineLearningServices
下面是用于创建端点的 yml 模板和 cli
端点.yml
$schema: https://azuremlschemas.azureedge.net/latest/onlineEndpoint.schema.json
name: bird-pytorch-endpoint-v1
auth_mode: key
cli 命令
az ml online-endpoint create --file endpoint.yml --resource-group myresourcepsrg --workspace-name azuremlws
以下是当前用户访问详情
Principal Role Scope
-------------------------------------------------------------------- ------ ---------------------------------------------------
azure_hari3_gmail.com#EXT#@azure_hari3gmail102.onmicrosoft.com Owner /subscriptions/75272772727-828
现在我遇到了以下错误
(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
对此有什么解决办法吗?
无法创建在线端点
最初,当我尝试创建在线端点时,我在我的环境中也遇到了相同的错误。
错误:
az ml online-endpoint create --file endpoint.yml" --resource-group venkatesan-rg --workspace-name venkatspace4
az : ERROR: (SubscriptionNotRegistered) Resource provider [N/A] isn't registered with Subscription [N/A]. Please see troubleshooting guide, available here: https://aka.ms/register-resource-provider
At line:1 char:1
+ az ml online-endpoint create --file "C:\Users\xxx\Downloads\endp ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (ERROR: (Subscri...source-provider:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
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
要解决上述错误,您需要在 Azure 订阅中注册
Microsoft.Cdn
和 Microsoft.PolicyInsights
。
传送门:
门户->< Your-Subscription>->资源提供商->搜索Microsoft.Cdn和Microsoft.PolicyInsights->注册。
注册两个资源提供者后,我可以使用相同的命令创建在线机器学习端点。
命令与输出:
PS C:\Users\xxx> az ml online-endpoint create --file "endpoint.yml" --resource-group "venkatesan-rg" --workspace-name "venkatspace4"
{
"auth_mode": "key",
"id": "/subscriptions/xxxx/resourceGroups/venkatesan-rg/providers/Microsoft.MachineLearningServices/workspaces/venkatspace4/onlineEndpoints/bird-pytorch-endpoint-v1",
"identity": {
"principal_id": "xxx",
"tenant_id": "9xxx",
"type": "system_assigned"
},
"kind": "Managed",
"location": "eastus",
"mirror_traffic": {},
"name": "bird-pytorch-endpoint-v1",
"openapi_uri": "https://bird-pytorch-endpoint-v1.eastus.inference.ml.azure.com/swagger.json",
"properties": {
"AzureAsyncOperationUri": "https://management.azure.com/subscriptions/xxxx/providers/Microsoft.MachineLearningServices/locations/eastus/mfeOperationsStatus/xxxx?api-version=2022-02-01-preview",
"azureml.onlineendpointid": "/subscriptions/xxx/resourcegroups/venkatesan-rg/providers/microsoft.machinelearningservices/workspaces/venkatspace4/onlineendpoints/bi
rd-pytorch-endpoint-v1",
"createdAt": "2024-10-17T10:14:22.250637+0000",
"createdBy": "xxxx",
"lastModifiedAt": "2024-10-17T10:14:22.250637+0000"
},
"provisioning_state": "Succeeded",
"public_network_access": "enabled",
"resourceGroup": "venkatesan-rg",
"scoring_uri": "https://bird-pytorch-endpoint-v1.eastus.inference.ml.azure.com/score",
"tags": {},
"traffic": {}
}
传送门: