diff --git a/classical/python-sdk-v2/mlops/devops-pipelines/deploy-batch-endpoint-pipeline.yml b/classical/python-sdk-v2/mlops/devops-pipelines/deploy-batch-endpoint-pipeline.yml new file mode 100644 index 0000000..9788999 --- /dev/null +++ b/classical/python-sdk-v2/mlops/devops-pipelines/deploy-batch-endpoint-pipeline.yml @@ -0,0 +1,68 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +variables: +- ${{ if eq(variables['Build.SourceBranchName'], 'main') }}: + # 'main' branch: PRD environment + - template: ../../config-infra-prod.yml +- ${{ if ne(variables['Build.SourceBranchName'], 'main') }}: + # 'develop' or feature branches: DEV environment + - template: ../../config-infra-dev.yml +- name: version + value: python-sdk-v2 +- name: endpoint_name + value: taxi-batch-$(namespace)$(postfix)$(environment) + +trigger: +- none + +pool: + vmImage: ubuntu-20.04 + + +resources: + repositories: + - repository: mlops-templates # Template Repo + name: Azure/mlops-templates # need to change org name from "Azure" to your own org + endpoint: github-connection # need to set up and hardcode + type: github + ref: main-dec31 + + +stages: +- stage: CreateBatchEndpoint + displayName: Create/Update Batch Endpoint + jobs: + - job: DeployBatchEndpoint + steps: + - checkout: self + path: s/ + - checkout: mlops-templates + path: s/templates/ + - template: templates/aml-cli-v2/install-az-cli.yml@mlops-templates + - template: templates/aml-cli-v2/install-aml-cli.yml@mlops-templates + - template: templates/aml-cli-v2/connect-to-workspace.yml@mlops-templates + - template: templates/aml-cli-v2/create-compute.yml@mlops-templates + parameters: + cluster_name: batch-cluster # name must match cluster name in deployment file below + size: STANDARD_DS3_V2 + min_instances: 0 + max_instances: 5 + cluster_tier: dedicated + - template: templates/${{ variables.version }}/create-batch-endpoint.yml@mlops-templates + parameters: + endpoint_name: "${{ variables.endpoint_name }}" + endpoint_description: "Taxi batch endpoint" + auth_mode: "aad_token" + - template: templates/${{ variables.version }}/create-batch-deployment.yml@mlops-templates + parameters: + deployment_name: taxi-batch-dp + deployment_description: "Taxi batch deployment" + endpoint_name: "${{ variables.endpoint_name }}" + model_path: "taxi-model@latest" + compute: batch-cluster + - template: templates/${{ variables.version }}/test-batch-endpoint.yml@mlops-templates + parameters: + endpoint_name: "${{ variables.endpoint_name }}" + sample_request: data/taxi-batch.csv + request_type: uri_file #either uri_folder or uri_file diff --git a/classical/python-sdk-v2/mlops/devops-pipelines/deploy-online-endpoint-pipeline.yml b/classical/python-sdk-v2/mlops/devops-pipelines/deploy-online-endpoint-pipeline.yml index a170735..a1a6cee 100644 --- a/classical/python-sdk-v2/mlops/devops-pipelines/deploy-online-endpoint-pipeline.yml +++ b/classical/python-sdk-v2/mlops/devops-pipelines/deploy-online-endpoint-pipeline.yml @@ -12,8 +12,6 @@ variables: value: python-sdk-v2 - name: endpoint_name value: taxi-online-$(namespace)$(postfix)$(environment) -- name: endpoint_type - value: online trigger: - none @@ -47,14 +45,14 @@ stages: parameters: endpoint_name: "${{ variables.endpoint_name }}" endpoint_description: "Taxi Online Endpoint" - endpoint_auth: "aml_token" + auth_mode: "aml_token" - template: templates/${{ variables.version }}/create-online-deployment.yml@mlops-templates parameters: deployment_name: taxi-online-dp endpoint_name: "${{ variables.endpoint_name }}" - model_name: "taxi-model@latest" - traffic: 100 + model_path: "taxi-model@latest" + traffic_allocation: 100 - template: templates/${{ variables.version }}/test-online-endpoint.yml@mlops-templates parameters: endpoint_name: "${{ variables.endpoint_name }}" - sample_request: data/taxi-request.json \ No newline at end of file + sample_request: data/taxi-request.json