Skip to content

settings and compute issues in pipelineComponentBatchDeployment yaml #41952

Open
@whitecap-max

Description

@whitecap-max
  • 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

  1. the yaml must load successfully with the "settings" item.
  2. the "compute" setting must be persistent
  3. If "compute" is a required item then an error message must be generated if it is missing.

Additional context
None

Metadata

Metadata

Assignees

No one assigned

    Labels

    Machine LearningService AttentionWorkflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions