Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AI Studio - serverless endpoints - ServerlessModelNotAvailableInRegion #662

Open
harsimrit opened this issue Nov 5, 2024 · 2 comments
Open

Comments

@harsimrit
Copy link

Hi,

I am trying to provision a serverless endpoint using azapi_resource for the azureml://registries/azureml/models/Phi-3.5-vision-instruct model in eastus2 but i am getting an error that "The requested model azureml://registries/azureml/models/Phi-3.5-vision-instruct is not available in region East US 2."

I am following the spec mentioned here -> https://learn.microsoft.com/en-us/azure/templates/microsoft.machinelearningservices/2024-04-01/workspaces/serverlessendpoints?pivots=deployment-language-terraform

Here is my code:

resource "azapi_resource" "ms_phi_35_vision_inst" {
  type      = "Microsoft.MachineLearningServices/workspaces/serverlessEndpoints@2024-04-01"
  name      = "phi-35-vision-inst"
  location  = "eastus2"
  parent_id = <id of the project>

  body = {
    sku = {
      name = "Consumption"
    }
    properties = {
      authMode = "Key"
      modelSettings = {
        modelId = "azureml://registries/azureml/models/Phi-3.5-vision-instruct"
      }
    }
  }
}

Complete Error:

│ {
│   "error": {
│     "code": "UserError",
│     "message": "The requested model azureml://registries/azureml/models/Phi-3.5-vision-instruct is not available in region East US 2.",
│     "details": [],
│     "additionalInfo": [
│       {
│         "type": "ComponentName",
│         "info": {
│           "value": "managementfrontend"
│         }
│       },
│       {
│         "type": "Correlation",
│         "info": {
│           "value": {
│             "operation": "df8877d5a1e63281627e84636220c4cf",
│             "request": "cca052e80839475b"
│           }
│         }
│       },
│       {
│         "type": "Environment",
│         "info": {
│           "value": "eastus2"
│         }
│       },
│       {
│         "type": "Location",
│         "info": {
│           "value": "eastus2"
│         }
│       },
│       {
│         "type": "Time",
│         "info": {
│           "value": "2024-11-05T18:57:50.6016318+00:00"
│         }
│       },
│       {
│         "type": "InnerError",
│         "info": {
│           "value": {
│             "code": "BadArgument",
│             "innerError": {
│               "code": "ServerlessModelNotAvailableInRegion",
│               "innerError": null
│             }
│           }
│         }
│       }
│     ]
│   }
│ }

I am able to to create a serverless deployment via the Studio UI and Azure CLI for the same model without any issue.

Any help/insights/guidance here.

@ms-henglu
Copy link
Member

Hi @harsimrit ,

Thank you for taking time to report this issue!

From the error message, it seems that the model is not available in region East US 2. Would you please try to deploy it in another region?

Or if you could deploy this resource via Portal or other client tools, you could use the azapi vscode extension to help generate the configuration.

How to generate the azapi configuration with azapi vscode extension?

  1. Copy the resource JSON. You could get the resource from Portal - JSON View, or az cli command like below:
az rest -m GET -u '/subscriptions/{subscription_id}/resourceGroups/{resource_group_name}/providers/Microsoft.MachineLearningServices/workspaces/{workspace_name}/serverlessEndpoints/{serverless_endpoint_name}?api-version=2024-04-01'
  1. Paste the resource JSON to the terraform file, the extension will help convert it to the azapi config.

@florianchappaz
Copy link

Thanks for your input @ms-henglu.
I was facing the same issue and your command helped me to realize that I was missing the 'sku' block (and anyway the values inside are documented nowhere).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants