Azure / mlops-v2

Azure MLOps (v2) solution accelerators. Enterprise ready templates to deploy your machine learning models on the Azure Platform.
https://learn.microsoft.com/en-us/azure/machine-learning/concept-model-management-and-deployment
MIT License
502 stars 248 forks source link

Repository mlops-templates references endpoint github-connection which does not exist or is not authorized for use #113

Closed kunanba closed 1 year ago

kunanba commented 1 year ago

Describe the bug or the issue that you are facing

Cannot create pipeline to train model (/mlops/devops-pipelines/deploy-model-training-pipeline.yml) with this error: Repository mlops-templates references endpoint github-connection which does not exist or is not authorized for use Are there any instructions missing with regards to defining pipeline resource?

Steps/Code to Reproduce

All steps up to Deploy Azure Machine Learning Model Training Pipeline step image

Expected Output

Pipeline is expected to run and complete

Versions

Azure DevOps. I changed branches to main. Bicep Azure ML CLI 2 Classical ML example

Which platform are you using for deploying your infrastrucutre?

Azure DevOps (ADO)

If you mentioned Others, please mention which platformm are you using?

No response

What are you using for deploying your infrastrucutre?

Bicep

Are you using Azure ML CLI v2 or Azure ML Python SDK v2

Azure ML CLI v2

Describe the example that you are trying to run?

Classical ML

setuc commented 1 year ago

@kunanba Can you check the following in your code

  1. Check if the pipeline is referring to the dev or prod configurations. We have the two lines where you set the name of the service connection that you have set. I believe that you have set this to github-connection.
  2. Do check if you have setup the Service Connection to Azure and ensure that you have set it to github-connection. Both these names have to match. See Step 4 in the Setup MLOps Example.
kunanba commented 1 year ago

Hi Setu, Thank you for your quick response.

  1. It is set to prod in mlops-project-templates: image It is supposed to use prod config if the branch is main in taxi-regression, correct? image
  2. I'm not sure which step you're referring to as it takes me to the same config-file with two highlighted lines. If this is the referenced step Create Service Connections I'm not sure where to set github-connection. Please advise.
kunanba commented 1 year ago

When I create new model-training-pipeline, resources in the yaml file are listed as follows: image Highlighted line mentions that github-connection needs to be set up and hardcoded. Is this ignored when one is deploying with Azure DevOps?

delbert commented 1 year ago

to clarify, this resource definition worked for me in the ADO + Classic ML case:

resources:
  repositories:
    - repository: mlops-templates  # Template Repo
      name: mlops-templates # need to change org name from "Azure" to your own org
      type: git
      ref: main