|
| 1 | +pool: |
| 2 | + vmImage: 'Ubuntu 16.04' |
| 3 | +#Your build pipeline references a secret variable named ‘sp_username’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it secret. See https://go.microsoft.com/fwlink/?linkid=865972 |
| 4 | +#Your build pipeline references a secret variable named ‘sp_password’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it secret. See https://go.microsoft.com/fwlink/?linkid=865972 |
| 5 | +#Your build pipeline references a secret variable named ‘sp_tenantid’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it secret. See https://go.microsoft.com/fwlink/?linkid=865972 |
| 6 | +#Your build pipeline references a secret variable named ‘subscription_id’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it secret. See https://go.microsoft.com/fwlink/?linkid=865972 |
| 7 | + |
| 8 | +steps: |
| 9 | +- task: CondaEnvironment@1 |
| 10 | + displayName: 'Create Conda Environment ' |
| 11 | + inputs: |
| 12 | + createCustomEnvironment: true |
| 13 | + environmentName: azuremlsdk |
| 14 | + packageSpecs: 'python=3.6' |
| 15 | + updateConda: false |
| 16 | + createOptions: 'cython numpy' |
| 17 | + |
| 18 | +- task: Bash@3 |
| 19 | + displayName: 'Install Requirements' |
| 20 | + inputs: |
| 21 | + targetType: filePath |
| 22 | + filePath: 'environment_setup/install_requirements.sh' |
| 23 | + workingDirectory: 'environment_setup' |
| 24 | + |
| 25 | +- script: | |
| 26 | + az login --service-principal -u $(sp_username) -p $(sp_password) --tenant $(sp_tenantid) |
| 27 | + |
| 28 | + displayName: 'Login to Azure' |
| 29 | + |
| 30 | +- script: | |
| 31 | + sed -i 's#"subscription_id": "<>"#"subscription_id": "$(subscription_id)"#g' aml_config/config.json |
| 32 | + |
| 33 | + displayName: 'replace subscription value' |
| 34 | + |
| 35 | +- script: 'python code/testing/data_test.py data/diabetes.csv && python code/testing/data_test.py data/diabetes_bad_dist.csv && python code/testing/data_test.py data/diabetes_bad_schema.csv && python code/testing/data_test.py data/diabetes_missing_values.csv' |
| 36 | + displayName: 'Data Quality Check' |
| 37 | + |
| 38 | +- script: 'python aml_service/00-WorkSpace.py' |
| 39 | + displayName: 'Get or Create workspace copy' |
| 40 | + |
| 41 | +- script: 'python aml_service/10-TrainOnLocal.py' |
| 42 | + displayName: 'Train on Local' |
| 43 | + |
| 44 | +- script: 'python aml_service/15-EvaluateModel.py' |
| 45 | + displayName: 'Evaluate Model' |
| 46 | + |
| 47 | +- script: 'python aml_service/20-RegisterModel.py' |
| 48 | + displayName: 'Register Model' |
| 49 | + |
| 50 | +- script: 'python aml_service/30-CreateScoringImage.py' |
| 51 | + displayName: 'Creating scoring image' |
| 52 | + |
| 53 | +- task: CopyFiles@2 |
| 54 | + displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)' |
| 55 | + inputs: |
| 56 | + SourceFolder: '$(Build.SourcesDirectory)' |
| 57 | + TargetFolder: '$(Build.ArtifactStagingDirectory)' |
| 58 | + Contents: '**' |
| 59 | + |
| 60 | +- task: PublishBuildArtifacts@1 |
| 61 | + displayName: 'Publish Artifact: devops-for-ai' |
| 62 | + inputs: |
| 63 | + ArtifactName: 'devops-for-ai' |
| 64 | + publishLocation: 'container' |
| 65 | + pathtoPublish: '$(Build.ArtifactStagingDirectory)' |
| 66 | + TargetPath: '$(Build.ArtifactStagingDirectory)' |
| 67 | + |
| 68 | + |
0 commit comments