HttpResponseError: Operation returned an invalid status 'OK' - Deploying Pipeline Component to BatchEndpoint

Moritz Damm 0 Reputation points
2024-12-16T12:08:59.7933333+00:00

Hi everyone,

I try to deploy a pipeline component from custom azure machine learning registry to a batch endpoint. The batch endpoint was created successfully. with the following code:

# connection to prod workspace
ml_client_dev = MLClient(
    credential=credential,
    subscription_id=dev_subscription_id,
    resource_group_name=dev_resource_group,
    workspace_name="xxx-dev",
)

# create client for registry
ml_client_registry = MLClient(
    credential=credential,
    registry_name="xxx_AML",
    registry_location="westeurope"
)

# create batch endpoint in dev workspace
endpoint_name = "project-endpoint-dev" # unique name which is NOT used in other workspaces within resource group
endpoint = BatchEndpoint(
    name=endpoint_name,
    description="An endpoint to get xxx",
    tags={"stage":"development"}
)
ml_client_dev.batch_endpoints.begin_create_or_update(endpoint).result()


# get component from registry
component_xxx = ml_client_registry.components.get("component_xxx", label="latest")
compute_name = "xxx-dev-ib"

# create deployment
deployment = PipelineComponentBatchDeployment(
    name="xxx-deploy-test",
    description="A deployment",
    endpoint_name=endpoint.name,
    component=component_xxx,
    settings={"continue_on_step_failure": False, "default_compute": compute_name},
)

ml_client_dev.batch_deployments.begin_create_or_update(deployment).result()

The deployment of the pipeline component failed with the following error:

HttpResponseError: Operation returned an invalid status 'OK'

I was also not able to deploy to a batch endpoint within another workspace in the same resource group. Any hints or ideas on how to solve this issue?

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
3,042 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SriLakshmi C 1,375 Reputation points Microsoft Vendor
    2024-12-16T20:36:07.3433333+00:00

    Hello Moritz Damm,

    Welcome to Microsoft Q&A! Thanks for posting the question.

    I understand that you're encountering an issue when deploying pipeline components to a batch endpoint in Azure Machine Learning, to troubleshoot the issue follow these steps:

    Verify the resource configurations. Ensure that all referenced resources, such as compute clusters, datasets, and environments, are properly set up and accessible within the workspace.

    Review the deployment logs in detail to identify any specific errors or warnings that could highlight the root cause of the failure. Logs provide insights into issues like misconfigured settings, dependency problems, or permission errors.

    Check for endpoint and component compatibility. Ensure that the pipeline component is designed to work with batch inference and that the input/output bindings align with the requirements of the batch endpoint.

    For more info kindly refer this Troubleshoot batch endpoints.

    Hope this helps, do let us know if you have any further queries.

    Thank you!

    1 person found this answer helpful.
    0 comments No comments

Your answer

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