|
1 | | -# MLHyperparameterTuning Pipeline |
2 | | - |
3 | | -trigger: none |
4 | | - |
5 | | -variables: |
6 | | - BuildConfiguration: Release |
7 | | - BuildBinariesDirectory: $(Build.BinariesDirectory) |
8 | | - BuildPlatform: any cpu |
9 | | - DotNetCoreBuildVersion: 2.2.108 |
10 | | - DotNetRuntimeTarget: ubuntu.18.04-x64 |
11 | | - AgentToolsDirectory: $(Agent.ToolsDirectory) |
12 | | - CloudPlatform: AzureCloud |
13 | | - ProductName: Trident |
14 | | - TridentWorkloadType: $(WorkloadType) |
15 | | - TridentWorkloadTypeShort: $(WorkloadTypeShort) |
16 | | - DeployLocation: eastus |
17 | | - Agent: agce-ai |
18 | | - azureSubscription: AG-AzureCAT-AIDevOps-Test-COGSNonProd-IO1685734(0ca618d2-22a8-413a-96d0-0f1b531129c3) |
19 | | - azure_subscription: 0ca618d2-22a8-413a-96d0-0f1b531129c3 |
20 | | - |
21 | | -jobs: |
22 | | -- job: MLHyperparameterTuningJob |
23 | | - timeoutInMinutes: 300 |
24 | | - cancelTimeoutInMinutes: 2 |
25 | | - pool: |
26 | | - vmImage: 'Ubuntu-16.04' |
27 | | - |
28 | | - steps: |
29 | | - - bash: | |
30 | | - source /usr/share/miniconda/etc/profile.d/conda.sh |
31 | | - which conda |
32 | | - conda env create -f environment.yml |
33 | | - conda env list |
34 | | - conda activate MLHyperparameterTuning |
35 | | - conda env list |
36 | | - echo Login Azure Account |
37 | | - az login -t $(sptenent) --service-principal -u $(spidentity) --password $(spsecret) |
38 | | - echo Try and figure out what account set takes |
39 | | - az account set -h |
40 | | - echo Try and set it. |
41 | | - az account set --subscription $(subscriptionid) |
42 | | -# papermill 01_Data_Prep.ipynb 01_Data_Prep_Output.ipynb --log-output --no-progress-bar -k python3 |
43 | | - displayName: 'Configuration' |
44 | | - |
45 | | - - bash: | |
46 | | - source /usr/share/miniconda/etc/profile.d/conda.sh |
47 | | - conda activate MLHyperparameterTuning |
48 | | - echo Executing 00_Data_Prep.ipynb |
49 | | - papermill 00_Data_Prep.ipynb 00_Data_Prep_Output.ipynb --log-output --no-progress-bar -k python3 |
50 | | - displayName: '00_Data_Prep.ipynb' |
51 | | -
|
52 | | - - bash: | |
53 | | - source /usr/share/miniconda/etc/profile.d/conda.sh |
54 | | - conda activate MLHyperparameterTuning |
55 | | - echo Executing 01_Training_Script.ipynb |
56 | | - papermill 01_Training_Script.ipynb 01_Training_Script_Output.ipynb --log-output --no-progress-bar -k python3 |
57 | | - displayName: '01_Training_Script.ipynb' |
58 | | - |
59 | | - - bash: | |
60 | | - source /usr/share/miniconda/etc/profile.d/conda.sh |
61 | | - conda activate MLHyperparameterTuning |
62 | | - echo Executing 02_Testing_Script.ipynb |
63 | | - papermill 02_Testing_Script.ipynb 02_Testing_Script_Output.ipynb --log-output --no-progress-bar -k python3 |
64 | | - displayName: '02_Testing_Script.ipynb' |
65 | | - |
66 | | - - bash: | |
67 | | - source /usr/share/miniconda/etc/profile.d/conda.sh |
68 | | - conda activate MLHyperparameterTuning |
69 | | - echo Executing 03_Run_Locally.ipynb |
70 | | - papermill 03_Run_Locally.ipynb 03_Run_Locally_Output.ipynb --log-output --no-progress-bar -k python3 -p selected_subscription $(subscriptionid) -p resource_group $(azurergname) |
71 | | - displayName: '03_Run_Locally.ipynb' |
72 | | -
|
73 | | - - bash: | |
74 | | - source /usr/share/miniconda/etc/profile.d/conda.sh |
75 | | - conda activate MLHyperparameterTuning |
76 | | - echo Executing 04_Hyperparameter_Random_Search.ipynb |
77 | | - papermill 04_Hyperparameter_Random_Search.ipynb 04_Hyperparameter_Random_Search_Output.ipynb --log-output --no-progress-bar -k python3 -p max_total_runs $(dsmaxruns) |
78 | | - displayName: '04_Hyperparameter_Random_Search.ipynb' |
79 | | -
|
80 | | - - bash: | |
81 | | - source /usr/share/miniconda/etc/profile.d/conda.sh |
82 | | - conda activate MLHyperparameterTuning |
83 | | - echo Executing 05_Train_Best_Model.ipynb |
84 | | - papermill 05_Train_Best_Model.ipynb 05_Train_Best_Model_Output.ipynb --log-output --no-progress-bar -k python3 |
85 | | - displayName: '05_Train_Best_Model.ipynb' |
86 | | -
|
87 | | - - bash: | |
88 | | - source /usr/share/miniconda/etc/profile.d/conda.sh |
89 | | - conda activate MLHyperparameterTuning |
90 | | - echo Executing 06_Test_Best_Model.ipynb |
91 | | - papermill 06_Test_Best_Model.ipynb 06_Test_Best_Model_Output.ipynb --log-output --no-progress-bar -k python3 |
92 | | - displayName: '06_Test_Best_Model.ipynb' |
93 | | -
|
94 | | - - bash: | |
95 | | - source /usr/share/miniconda/etc/profile.d/conda.sh |
96 | | - conda activate MLHyperparameterTuning |
97 | | - echo Executing 07_Train_With_AML_Pipeline.ipynb |
98 | | - papermill 07_Train_With_AML_Pipeline.ipynb 07_Train_With_AML_Pipeline_Output.ipynb --log-output --no-progress-bar -k python3 -p max_total_runs $(dsmaxruns) |
99 | | - displayName: '07_Train_With_AML_Pipeline.ipynb' |
100 | | -
|
101 | | - - bash: | |
102 | | - source /usr/share/miniconda/etc/profile.d/conda.sh |
103 | | - conda activate MLHyperparameterTuning |
104 | | - echo Executing 08_Tear_Down.ipynb |
105 | | - papermill 08_Tear_Down.ipynb 08_Tear_Down_Output.ipynb --log-output --no-progress-bar -k python3 |
106 | | - displayName: '08_Tear_Down.ipynb' |
107 | | -
|
108 | | - - bash: | |
109 | | - source /usr/share/miniconda/etc/profile.d/conda.sh |
110 | | - conda activate MLHyperparameterTuning |
111 | | - echo Execute Resource Group Delete |
112 | | - existResponse=$(az group exists -n $(azurergname)) |
113 | | - if [ "$existResponse" == "true" ]; then |
114 | | - echo Deleting project resource group |
115 | | - az group delete --name $(azurergname) --yes |
116 | | - else |
117 | | - echo Project resource group did not exist |
118 | | - fi |
119 | | - echo Done Cleanup |
120 | | - displayName: 'Backup Cleanup' |
121 | | - condition: or(canceled(),failed()) |
122 | | -
|
123 | | - - task: CreateWorkItem@1 |
124 | | - inputs: |
125 | | - workItemType: 'Issue' |
126 | | - title: $(System.TeamProject) - Build $(Build.BuildNumber) Failed |
127 | | - assignedTo: 'Mario Bourgoin <mabou@microsoft.com>' |
128 | | - associate: true |
129 | | - teamProject: $(System.TeamProject) |
130 | | - |
131 | | - fieldMappings: | |
132 | | - Description=Branch: Branch $(Build.SourceBranch) failed to build. Go to Boards>WorkItems and tag the failure type. |
133 | | - displayName: 'Create work item on failure' |
134 | | - condition: failed() |
| 1 | +# MLHyperparameterTuning Pipeline |
| 2 | +# |
| 3 | +# A Github Service Connection must also be created with the name "AIArchitecturesAndPractices-GitHub" |
| 4 | + |
| 5 | +resources: |
| 6 | + repositories: |
| 7 | + - repository: aitemplates |
| 8 | + type: github |
| 9 | + name: microsoft/AI |
| 10 | + endpoint: AIArchitecturesAndPractices-GitHub |
| 11 | + |
| 12 | +trigger: |
| 13 | + branches: |
| 14 | + include: |
| 15 | + - master |
| 16 | + - mabou/instrument |
| 17 | + |
| 18 | +pr: |
| 19 | + autoCancel: true |
| 20 | + branches: |
| 21 | + include: |
| 22 | + - master |
| 23 | + - mabou/instrument |
| 24 | + |
| 25 | +stages: |
| 26 | +- template: .ci/stages/deploy_notebooks_stages_v2.yml@aitemplates |
| 27 | + parameters: |
| 28 | + jobDisplayName: MLScoreDeployJob |
| 29 | + DefaultWorkingDirectory: $(System.DefaultWorkingDirectory) |
| 30 | + workload_vars: ../vars/mlhyperparametertuning_vars.yml |
0 commit comments