Skip to content

Commit 2796b40

Browse files
author
j-so
committed
remove old pipeline
1 parent dbe8b33 commit 2796b40

7 files changed

+76
-368
lines changed

.pipelines/diabetes_regression-ci-image.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,9 @@ variables:
3030
value: 'scoring/scoreB.py'
3131

3232
steps:
33-
- task: AzureCLI@1
34-
inputs:
35-
azureSubscription: '$(WORKSPACE_SVC_CONNECTION)'
36-
scriptLocation: inlineScript
37-
workingDirectory: $(Build.SourcesDirectory)
38-
inlineScript: |
39-
set -e
40-
export SUBSCRIPTION_ID=$(az account show --query id -o tsv)
41-
python3 -m ml_service.util.create_scoring_image
42-
displayName: 'Create Scoring Image'
33+
- template: diabetes_regression-package-model-template.yml
34+
parameters:
35+
modelId: $(MODEL_NAME):$(MODEL_VERSION)
36+
scoringScriptPath: '$(Build.SourcesDirectory)/$(SOURCES_DIR_TRAIN)/$(SCORE_SCRIPT)'
37+
condaFilePath: '$(Build.SourcesDirectory)/$(SOURCES_DIR_TRAIN)/conda_dependencies.yml'
4338

.pipelines/diabetes_regression-ci-train-register.yml

Lines changed: 0 additions & 97 deletions
This file was deleted.

.pipelines/diabetes_regression-ci.yml

Lines changed: 5 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Continuous Integration (CI) pipeline that orchestrates the training, evaluation, registration, deployment, and testing of the diabetes_regression model.
1+
# Continuous Integration (CI) pipeline that orchestrates the training, evaluation, and registration of the diabetes_regression model.
22

33
resources:
44
containers:
@@ -27,7 +27,6 @@ pool:
2727
stages:
2828
- stage: 'Model_CI'
2929
displayName: 'Model CI'
30-
condition: not(variables['MODEL_BUILD_ID'])
3130
jobs:
3231
- job: "Model_CI_Pipeline"
3332
displayName: "Model CI Pipeline"
@@ -48,8 +47,8 @@ stages:
4847
displayName: 'Publish Azure Machine Learning Pipeline'
4948

5049
- stage: 'Trigger_AML_Pipeline'
51-
displayName: 'Train model'
52-
condition: and(succeeded(), not(variables['MODEL_BUILD_ID']))
50+
displayName: 'Train and evaluate model'
51+
condition: succeeded()
5352
variables:
5453
BUILD_URI: '$(SYSTEM.COLLECTIONURI)$(SYSTEM.TEAMPROJECT)/_build/results?buildId=$(BUILD.BUILDID)'
5554
jobs:
@@ -91,116 +90,8 @@ stages:
9190
- job: "Training_Run_Report"
9291
dependsOn: "Run_ML_Pipeline"
9392
condition: always()
94-
displayName: "Determine if evaluation succeeded and new model is registered"
93+
displayName: "Publish artifact if new model was registered"
9594
container: mlops
9695
timeoutInMinutes: 0
9796
steps:
98-
- template: diabetes_regression-get-model-version-template.yml
99-
100-
- stage: 'Deploy_ACI'
101-
displayName: 'Deploy to ACI'
102-
dependsOn: Trigger_AML_Pipeline
103-
condition: and(or(succeeded(), variables['MODEL_BUILD_ID']), variables['ACI_DEPLOYMENT_NAME'])
104-
jobs:
105-
- job: "Deploy_ACI"
106-
displayName: "Deploy to ACI"
107-
container: mlops
108-
timeoutInMinutes: 0
109-
steps:
110-
- template: diabetes_regression-get-model-version-template.yml
111-
- task: ms-air-aiagility.vss-services-azureml.azureml-model-deploy-task.AMLModelDeploy@0
112-
displayName: 'Azure ML Model Deploy'
113-
inputs:
114-
azureSubscription: $(WORKSPACE_SVC_CONNECTION)
115-
modelSourceType: manualSpec
116-
modelName: '$(MODEL_NAME)'
117-
modelVersion: $(MODEL_VERSION)
118-
inferencePath: '$(Build.SourcesDirectory)/$(SOURCES_DIR_TRAIN)/scoring/inference_config.yml'
119-
deploymentTarget: ACI
120-
deploymentName: $(ACI_DEPLOYMENT_NAME)
121-
deployConfig: '$(Build.SourcesDirectory)/$(SOURCES_DIR_TRAIN)/scoring/deployment_config_aci.yml'
122-
overwriteExistingDeployment: true
123-
- task: AzureCLI@1
124-
displayName: 'Smoke test'
125-
inputs:
126-
azureSubscription: '$(WORKSPACE_SVC_CONNECTION)'
127-
scriptLocation: inlineScript
128-
inlineScript: |
129-
set -e # fail on error
130-
export SUBSCRIPTION_ID=$(az account show --query id -o tsv)
131-
python -m ml_service.util.smoke_test_scoring_service --type ACI --service "$(ACI_DEPLOYMENT_NAME)"
132-
133-
- stage: 'Deploy_AKS'
134-
displayName: 'Deploy to AKS'
135-
dependsOn: Deploy_ACI
136-
condition: and(succeeded(), variables['AKS_DEPLOYMENT_NAME'])
137-
jobs:
138-
- job: "Deploy_AKS"
139-
displayName: "Deploy to AKS"
140-
container: mlops
141-
timeoutInMinutes: 0
142-
steps:
143-
- template: diabetes_regression-get-model-version-template.yml
144-
- task: ms-air-aiagility.vss-services-azureml.azureml-model-deploy-task.AMLModelDeploy@0
145-
displayName: 'Azure ML Model Deploy'
146-
inputs:
147-
azureSubscription: $(WORKSPACE_SVC_CONNECTION)
148-
modelSourceType: manualSpec
149-
modelName: '$(MODEL_NAME)'
150-
modelVersion: $(MODEL_VERSION)
151-
inferencePath: '$(Build.SourcesDirectory)/$(SOURCES_DIR_TRAIN)/scoring/inference_config.yml'
152-
deploymentTarget: AKS
153-
aksCluster: $(AKS_COMPUTE_NAME)
154-
deploymentName: $(AKS_DEPLOYMENT_NAME)
155-
deployConfig: '$(Build.SourcesDirectory)/$(SOURCES_DIR_TRAIN)/scoring/deployment_config_aks.yml'
156-
overwriteExistingDeployment: true
157-
- task: AzureCLI@1
158-
displayName: 'Smoke test'
159-
inputs:
160-
azureSubscription: '$(WORKSPACE_SVC_CONNECTION)'
161-
scriptLocation: inlineScript
162-
inlineScript: |
163-
set -e # fail on error
164-
export SUBSCRIPTION_ID=$(az account show --query id -o tsv)
165-
python -m ml_service.util.smoke_test_scoring_service --type AKS --service "$(AKS_DEPLOYMENT_NAME)"
166-
167-
- stage: 'Deploy_Webapp'
168-
displayName: 'Deploy to Webapp'
169-
dependsOn: Trigger_AML_Pipeline
170-
condition: and(or(succeeded(), variables['MODEL_BUILD_ID']), variables['WEBAPP_DEPLOYMENT_NAME'])
171-
jobs:
172-
- job: "Deploy_Webapp"
173-
displayName: "Deploy to Webapp"
174-
container: mlops
175-
timeoutInMinutes: 0
176-
steps:
177-
- template: diabetes_regression-get-model-version-template.yml
178-
- task: AzureCLI@1
179-
displayName: 'Create scoring image and set IMAGE_LOCATION variable'
180-
inputs:
181-
azureSubscription: '$(WORKSPACE_SVC_CONNECTION)'
182-
scriptLocation: inlineScript
183-
inlineScript: |
184-
set -e # fail on error
185-
export SUBSCRIPTION_ID=$(az account show --query id -o tsv)
186-
python -m ml_service.util.create_scoring_image --output_image_location_file image_location.txt
187-
# Output image location to Azure DevOps job
188-
IMAGE_LOCATION="$(cat image_location.txt)"
189-
echo "##vso[task.setvariable variable=IMAGE_LOCATION]$IMAGE_LOCATION"
190-
- task: AzureWebAppContainer@1
191-
name: WebAppDeploy
192-
displayName: 'Azure Web App on Container Deploy'
193-
inputs:
194-
azureSubscription: '$(AZURE_RM_SVC_CONNECTION)'
195-
appName: '$(WEBAPP_DEPLOYMENT_NAME)'
196-
resourceGroupName: '$(RESOURCE_GROUP)'
197-
imageName: '$(IMAGE_LOCATION)'
198-
- task: AzureCLI@1
199-
displayName: 'Smoke test'
200-
inputs:
201-
azureSubscription: '$(WORKSPACE_SVC_CONNECTION)'
202-
scriptLocation: inlineScript
203-
inlineScript: |
204-
set -e # fail on error
205-
export SUBSCRIPTION_ID=$(az account show --query id -o tsv)
206-
python -m ml_service.util.smoke_test_scoring_service --type Webapp --service "$(WebAppDeploy.AppServiceApplicationUrl)/score"
97+
- template: diabetes_regression-publish-model-artifact-template.yml

.pipelines/diabetes_regression-get-model-version-template.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)