How to import Microsoft.RelInfra.Common.Exception so that it could be properly handled?

Shivapriya Katta 51 Reputation points
2022-02-04T17:56:08.443+00:00

I am working on creating a Pipeline Endpoint and want to handle the exception if incorrect Pipeline endpoint name is passed to the constructor:

PipelineEndpoint.get(workspace, name='xyz')

In this case, I am seeing a "Microsoft.RelInfra.Common.Exceptions.ErrorResponseException:PipelineEndpoint name xyz not found in workspace".

From where to import this exception class??

Please advise.

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

1 answer

Sort by: Most helpful
  1. YutongTie-MSFT 48,586 Reputation points
    2022-02-05T04:24:34.057+00:00

    @Shivapriya Katta

    I think the first thing is make sure your endpoint_pipeline is set up correctly.

    You can try to return all active pipeline to see if the pipeline you want to call is in the list:

    endpoint_list = PipelineEndpoint.list(workspace=ws, active_only=True)  
    endpoint_list  
    

    I also attach the guidance of how to deploy a pipeline here for your reference:
    https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/machine-learning-pipelines/intro-to-pipelines/aml-pipelines-setup-versioned-pipeline-endpoints.ipynb

    Regards,
    Yutong

    2 people found this answer helpful.