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

Shivapriya Katta 51 Reputation points

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,539 questions
{count} votes

1 answer

Sort by: Most helpful
  1. YutongTie-MSFT 45,826 Reputation points

    @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)  

    I also attach the guidance of how to deploy a pipeline here for your reference:


    2 people found this answer helpful.