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
474 stars 224 forks source link

Unexpected parameter "build_type" when running deploy-model-training-pipeline in CV pattern #101

Open changwei0314 opened 1 year ago

changwei0314 commented 1 year ago

Describe the bug or the issue that you are facing

I encounter an error when running deploy-model-training-pipeline.yaml

image

Steps/Code to Reproduce

I use the following configuration to generate the required code for deploying the pipeline.

image

Expected Output

Expect to run the deploy-model-training pipeline successfully.

Versions

main branch

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?

CV

### Tasks
- [ ] Add Fix to remove build type from the CV model training pipeline for ADO.
patcharees commented 1 year ago

Hi. I am having this problem as well. Any workaround?

setuc commented 1 year ago

The template needs a fix

You will notice that the build_type was not setup or passed as a parameter to the register environment file that can be found here. https://github.com/Azure/mlops-templates/blob/34dc9a07612cf920db5e1377a90f672b43ab8afd/.github/workflows/register-environment.yml

You can remove the build type or use a similar approach from classical template.

https://github.com/Azure/mlops-project-template/blob/acd9c8afbcd477cf85da819ace5e3ccd1dadd105/classical/aml-cli-v2/mlops/devops-pipelines/deploy-model-training-pipeline.yml#L51

I will need to retest the pipelines to fix the error. Give me some time to test it and address this issue.

patcharees commented 1 year ago

Hi @setuc, Thanks for info. I found another issue. It is missing /templates/aml-cli-v2/register-dataset.yml in mlops-templates repo. Any workaround?

setuc commented 1 year ago

@patcharees let me review the CV templates to see what is causing these issues?

There is register dataset but CV doesn’t use that as we download the data on the fly. Do you have the error message that you get

patcharees commented 1 year ago

Below is my template mlops-project-template\cv\aml-cli-v2\mlops\devops-pipelines\deploy-model-training-pipeline.yml. You can see it requires register-dataset.yml. When I run this pipeline to deploy model training, I got this error

/mlops/devops-pipelines/deploy-model-training-pipeline.yml: File /templates/aml-cli-v2/register-dataset.yml not found in repository https://dev.azure.com/xxx/xxx/_git/mlops-templates branch refs/heads/main version fe222c36eaa8c0949d99e97e6ba5f17361f1f108.

as register-dataset.yml does not really exist in aml-cli-v2 folder


name: deploy-model-training-pipeline

variables:

trigger: none

pool: vmImage: ubuntu-20.04

resources: repositories:

stages:

Dan-RT commented 1 year ago

Hi guys, I am facing the same bug with the same settings, @setuc did you get the chance to look at this issue? @changwei0314 @patcharees did one of you figure out a workaround? @changwei0314 I saw you have a similar project but using terraform and github

setuc commented 11 months ago

@Dan-RT Try removing build-type from the line 58 here

https://github.com/Azure/mlops-project-template/blob/acd9c8afbcd477cf85da819ace5e3ccd1dadd105/cv/aml-cli-v2/mlops/devops-pipelines/deploy-model-training-pipeline.yml#L58

I will issue a patch for it.

changwei0314 commented 11 months ago

Hi @Dan-RT, If you don't necessarily need to use Bicep and Azure DevOps, I would suggest referring to the guidance provided by this repository.

I have successfully built an MLOps engine using this guidance. However, please note that this project utilizes Terraform and GitHub Actions.

setuc commented 11 months ago

@changwei0314 @Dan-RT Is Bicep really a priority for you?