batch-deployment create error - incorrect schema type

ShilpaGopal 105 Reputation points
2024-01-02T15:12:17.74+00:00

I need pointers in resolving the azureml batch endpoint deployment error that I am facing.

I am trying to create batch azure ml deployment and deployment.yml is below.

User's image

As per the batchDeployment schema, the allowed values for type is "model" or "pipeline". User's image

I am able to create the endpoint successfully.

But, when I run the batch-deployment create command as part of azure devops, I get the error for type as:

Batch deployment command in azure devops:

az ml batch-deployment create --endpoint heart-class-endpoint -f ./heartprediction/cli/endpoints/batchendpoint/deployment.yml --set-default

Error:

ERROR: The command failed with an unexpected error. Here is the traceback:
ERROR: Validation for BatchDeploymentSchema failed: 
 {
  "type": [
    "Value 'pipeline' passed is not in set ['component', 'model']"
  ],
  "component": [
    "Unknown field."
  ]
} 

I even tried modifying the schema version in deployment.yml to the exact version 2.20.0 which is the latest version and the schema supports type= 'pipeline'.

https://azuremlschemasprod.azureedge.net/

https://azuremlschemasprod.azureedge.net/2.20.0/batchDeployment.schema.json

CLI version that I am using in CI pipeline is: azure-cli 2.55.0

What is the cause of the error? Is it due to the incorrect schema referenced at run time in devops?

Azure Machine Learning
{count} votes

Your answer

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