Description
- Package Name: azure-ai-ml
- Package Version: 1.28.1
- Operating System: Ubuntu
- Python Version: 3.10
Describe the bug
When trying to load a batch deployment with a pipeline using a yaml file that conforms to schema and using the example from azureml-examples as a template the "settings" item causes a ValidationError.
Trying to invoke this endpoint then also fails because none of the steps know which compute to target, unless it is explicitly specified for each step in the pipeline.
To Reproduce
Following the "batch scoring with preprocessing" example from azureml-examples I have the following deployment definition:
$schema: https://azuremlschemas.azureedge.net/latest/pipelineComponentBatchDeployment.schema.json
name: my-batch-deployment
endpoint_name: my-endpoint
type: pipeline
component: pipeline.yml
settings:
continue_on_step_failure: false
default_compute: compute-cluster
When I try to load it using:
from azure.ai.ml import load_batch_deployment
batch_deployment = load_batch_deployment("../mlops/batch_endpoints/my_batch_deployment/deployment.yml")
I get an error:
ValidationError: Validation for BatchDeploymentSchema failed:
{
"settings": [
"Unknown field."
]
}
According to the documentation there is a required field "compute"
If I then modify the yaml to:
$schema: https://azuremlschemas.azureedge.net/latest/pipelineComponentBatchDeployment.schema.json
name: my-batch-deployment
endpoint_name: my-endpoint
type: pipeline
component: pipeline.yml
compute: compute-cluster
It loads successfully and the following code prints the correct value:
from azure.ai.ml import load_batch_deployment
batch_deployment = load_batch_deployment("../mlops/batch_endpoints/nursing_predict_batch/deployment.yml")
print(batch_deployment.compute)
However, if I then run:
ml_client.batch_deployments.begin_create_or_update(batch_deployment)
batch_dep = ml_client.batch_deployments.get(name="my-batch-deployment", endpoint_name="my-endpoint")
print(batch_dep.compute)
It prints "None".
Expected behavior
- the yaml must load successfully with the "settings" item.
- the "compute" setting must be persistent
- If "compute" is a required item then an error message must be generated if it is missing.
Additional context
None