Skip to content

Issue with local endpoints when invoke #40631

Open
@GuillermoCaminero-TomTom

Description

I have an azure machine learning managed online deployment. I'm working fully locally for now and I see that there is an error when using only local. Let's have for this example no endpoints and no deployments created in azure ml.

When I try to invoke the local endpoint using the OnlineEndpointOperations (MLClient.online_endpoints). I get an error because it tries to validate the deployment name.

  • I see an easy fix for this as only validate the deployment name if it's an online endpoint and not doing it if local=True.

The correct solution would be fixing the function _validate_deployment_name to accept the local=local as parameter. The problem here is that inside this function there is no easy way to get the deployments_list for local unless the _LocalDeploymentHelper is instantiated.

Now in the code I have I have a monkey patch in order to skip the validation and then I can do the invoke like this:

online_endpoints_operator = ml_client.online_endpoints
if local_deploy:
        online_endpoints_operator._validate_deployment_name = (
            lambda *args, **kwargs: True
        )
online_endpoints_operator.invoke(
        endpoint_name=endpoint_name,
        deployment_name=deployment_name,
        local=local_deploy,
        request_file=f"{model_score_path}/{model_sample_input}",
    )

Metadata

Metadata

Labels

ClientThis issue points to a problem in the data-plane of the library.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