-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Batch Scoring First Draft: Added pipeline creation and run scripts, scoring script, new environment variables, changes to env loading script, compute creation and AML environment creation scripts, and new Azure pipeline for batch scoring CI * Score copy step added * Modified bootstrap.py, updated getting started doc * Addressed PR comments * Addressed PR comments * Doc fix * Doc fix
- Loading branch information
Showing
19 changed files
with
1,311 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Continuous Integration (CI) pipeline that orchestrates the batch scoring of the diabetes_regression model. | ||
|
||
resources: | ||
containers: | ||
- container: mlops | ||
image: mcr.microsoft.com/mlops/python:latest | ||
|
||
|
||
pr: none | ||
trigger: | ||
branches: | ||
include: | ||
- master | ||
paths: | ||
include: | ||
- diabetes_regression/scoring/parallel_batchscore.py | ||
- ml_service/pipelines/diabetes_regression_build_parallel_batchscore_pipeline.py | ||
- ml_service/pipelines/run_parallel_batchscore_pipeline.py | ||
|
||
variables: | ||
- template: diabetes_regression-variables-template.yml | ||
- group: devopsforai-aml-vg | ||
|
||
pool: | ||
vmImage: ubuntu-latest | ||
|
||
stages: | ||
- stage: 'Batch_Scoring_Pipeline_CI' | ||
displayName: 'Batch Scoring Pipeline CI' | ||
jobs: | ||
- job: "Build_Batch_Scoring_Pipeline" | ||
displayName: "Build Batch Scoring Pipeline" | ||
container: mlops | ||
timeoutInMinutes: 0 | ||
steps: | ||
- template: code-quality-template.yml | ||
- task: AzureCLI@1 | ||
name: publish_batchscore | ||
inputs: | ||
azureSubscription: '$(WORKSPACE_SVC_CONNECTION)' | ||
scriptLocation: inlineScript | ||
workingDirectory: $(Build.SourcesDirectory) | ||
inlineScript: | | ||
set -e # fail on error | ||
export SUBSCRIPTION_ID=$(az account show --query id -o tsv) | ||
# Invoke the Python building and publishing a training pipeline | ||
python -m ml_service.pipelines.diabetes_regression_build_parallel_batchscore_pipeline | ||
- job: "Run_Batch_Score_Pipeline" | ||
displayName: "Run Batch Scoring Pipeline" | ||
dependsOn: "Build_Batch_Scoring_Pipeline" | ||
timeoutInMinutes: 240 | ||
pool: server | ||
variables: | ||
pipeline_id: $[ dependencies.Build_Batch_Scoring_Pipeline.outputs['publish_batchscore.pipeline_id']] | ||
steps: | ||
- task: ms-air-aiagility.vss-services-azureml.azureml-restApi-task.MLPublishedPipelineRestAPITask@0 | ||
displayName: 'Invoke Batch Scoring pipeline' | ||
inputs: | ||
azureSubscription: '$(WORKSPACE_SVC_CONNECTION)' | ||
PipelineId: '$(pipeline_id)' | ||
ExperimentName: '$(EXPERIMENT_NAME)' | ||
PipelineParameters: '"ParameterAssignments": {"model_name": "$(MODEL_NAME)"}' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Conda environment specification. The dependencies defined in this file will | ||
# be automatically provisioned for managed runs. These include runs against | ||
# the localdocker, remotedocker, and cluster compute targets. | ||
|
||
# Note that this file is NOT used to automatically manage dependencies for the | ||
# local compute target. To provision these dependencies locally, run: | ||
# conda env update --file conda_dependencies.yml | ||
|
||
# Details about the Conda environment file format: | ||
# https://conda.io/docs/using/envs.html#create-environment-file-by-hand | ||
|
||
# For managing Spark packages and configuration, see spark_dependencies.yml. | ||
# Version of this configuration file's structure and semantics in AzureML. | ||
# This directive is stored in a comment to preserve the Conda file structure. | ||
# [AzureMlVersion] = 2 | ||
|
||
# These dependencies are used to create the environment used by the batch score | ||
# copy pipeline step | ||
name: diabetes_regression_score_copy_env | ||
dependencies: | ||
# The python interpreter version. | ||
# Currently Azure ML Workbench only supports 3.5.2 and later. | ||
- python=3.7.* | ||
- pip | ||
|
||
- pip: | ||
# Base AzureML SDK | ||
- azureml-sdk==1.6.* | ||
|
||
# Score copying deps | ||
- azure-storage-blob |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Conda environment specification. The dependencies defined in this file will | ||
# be automatically provisioned for managed runs. These include runs against | ||
# the localdocker, remotedocker, and cluster compute targets. | ||
|
||
# Note that this file is NOT used to automatically manage dependencies for the | ||
# local compute target. To provision these dependencies locally, run: | ||
# conda env update --file conda_dependencies.yml | ||
|
||
# Details about the Conda environment file format: | ||
# https://conda.io/docs/using/envs.html#create-environment-file-by-hand | ||
|
||
# For managing Spark packages and configuration, see spark_dependencies.yml. | ||
# Version of this configuration file's structure and semantics in AzureML. | ||
# This directive is stored in a comment to preserve the Conda file structure. | ||
# [AzureMlVersion] = 2 | ||
|
||
# These dependencies are used to create the environment used by the batch score | ||
# pipeline step | ||
name: diabetes_regression_scoring_env | ||
dependencies: | ||
# The python interpreter version. | ||
# Currently Azure ML Workbench only supports 3.5.2 and later. | ||
- python=3.7.* | ||
- pip | ||
|
||
- pip: | ||
# Base AzureML SDK | ||
- azureml-sdk==1.6.* | ||
|
||
# Scoring deps | ||
- scikit-learn | ||
- pandas |
Oops, something went wrong.