From bea4657b2ea449cebf12f4d01fea7d7c86640633 Mon Sep 17 00:00:00 2001 From: Eugene Fedorenko Date: Thu, 12 Dec 2019 14:17:14 -0800 Subject: [PATCH 1/6] Take the latest model for the scoring image --- ml_service/util/create_scoring_image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ml_service/util/create_scoring_image.py b/ml_service/util/create_scoring_image.py index 0968b6c4..1a1b10b8 100644 --- a/ml_service/util/create_scoring_image.py +++ b/ml_service/util/create_scoring_image.py @@ -25,7 +25,7 @@ ) args = parser.parse_args() -model = Model(ws, name=e.model_name, version=e.model_version) +model = Model(ws, name=e.model_name) os.chdir("./code/scoring") image_config = ContainerImage.image_configuration( From 6b811610f182dd3584aa72e79eb6c6da748b5de4 Mon Sep 17 00:00:00 2001 From: Eugene Fedorenko Date: Thu, 12 Dec 2019 15:03:04 -0800 Subject: [PATCH 2/6] revert back --- ml_service/util/create_scoring_image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ml_service/util/create_scoring_image.py b/ml_service/util/create_scoring_image.py index 1a1b10b8..0968b6c4 100644 --- a/ml_service/util/create_scoring_image.py +++ b/ml_service/util/create_scoring_image.py @@ -25,7 +25,7 @@ ) args = parser.parse_args() -model = Model(ws, name=e.model_name) +model = Model(ws, name=e.model_name, version=e.model_version) os.chdir("./code/scoring") image_config = ContainerImage.image_configuration( From 80764d1d8765eee798075dca92731d21d9fb7d63 Mon Sep 17 00:00:00 2001 From: Eugene Fedorenko Date: Thu, 12 Dec 2019 15:04:18 -0800 Subject: [PATCH 3/6] test alpha --- .pipelines/azdo-ci-build-train.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.pipelines/azdo-ci-build-train.yml b/.pipelines/azdo-ci-build-train.yml index e1ed0dc6..7bb4535e 100644 --- a/.pipelines/azdo-ci-build-train.yml +++ b/.pipelines/azdo-ci-build-train.yml @@ -66,7 +66,8 @@ stages: # Generate a hyperparameter value as a random number between 0 and 1. # A random value is used here to make the Azure ML dashboards "interesting" when testing # the solution sample. - alpha=$(printf "0.%03d\n" $((($RANDOM*1000)/32767))) + # alpha=$(printf "0.%03d\n" $((($RANDOM*1000)/32767))) + alpha=0.5 echo "Alpha: $alpha" echo "##vso[task.setvariable variable=ALPHA;isOutput=true]$alpha" name: 'getalpha' From ad10a5c702574a73b98399fe8166f4d8dea700cc Mon Sep 17 00:00:00 2001 From: Eugene Fedorenko Date: Thu, 12 Dec 2019 16:59:05 -0800 Subject: [PATCH 4/6] Correct package version --- code/scoring/conda_dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/scoring/conda_dependencies.yml b/code/scoring/conda_dependencies.yml index 41a05694..9c5505e2 100644 --- a/code/scoring/conda_dependencies.yml +++ b/code/scoring/conda_dependencies.yml @@ -28,7 +28,7 @@ dependencies: - azureml-model-management-sdk==1.0.1b6.post1 - azureml-sdk==1.0.74 - scipy==1.3.1 - - scikit-learn==0.21.3 + - scikit-learn==0.22 - pandas==0.25.3 - numpy==1.17.3 - joblib==0.14.0 From a9448e2a66a1c0c1eeafdcb17ba7c6c12c90be30 Mon Sep 17 00:00:00 2001 From: Eugene Fedorenko Date: Thu, 12 Dec 2019 16:59:33 -0800 Subject: [PATCH 5/6] revert alpha --- .pipelines/azdo-ci-build-train.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.pipelines/azdo-ci-build-train.yml b/.pipelines/azdo-ci-build-train.yml index 7bb4535e..e1ed0dc6 100644 --- a/.pipelines/azdo-ci-build-train.yml +++ b/.pipelines/azdo-ci-build-train.yml @@ -66,8 +66,7 @@ stages: # Generate a hyperparameter value as a random number between 0 and 1. # A random value is used here to make the Azure ML dashboards "interesting" when testing # the solution sample. - # alpha=$(printf "0.%03d\n" $((($RANDOM*1000)/32767))) - alpha=0.5 + alpha=$(printf "0.%03d\n" $((($RANDOM*1000)/32767))) echo "Alpha: $alpha" echo "##vso[task.setvariable variable=ALPHA;isOutput=true]$alpha" name: 'getalpha' From 99b8ad903cc117c7a9ed2564765b3aa64100b6cb Mon Sep 17 00:00:00 2001 From: Eugene Fedorenko Date: Fri, 13 Dec 2019 09:57:16 -0800 Subject: [PATCH 6/6] doc updatye --- docs/getting_started.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/getting_started.md b/docs/getting_started.md index b5e92902..485d36d4 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -182,6 +182,8 @@ specified). * The second stage of the pipeline, **Train model**, triggers the run of the ML Training Pipeline. The training pipeline will train, evaluate, and register a new model. The actual computation is performed in an [Azure Machine Learning Compute cluster](https://docs.microsoft.com/en-us/azure/machine-learning/service/how-to-set-up-training-targets#amlcompute). In Azure DevOps, this stage runs an agentless job that waits for the completion of the Azure ML job, so it can wait for training completion for hours or even days without using agent resources. +**Note:** If the model evaluation determines that the new model does not perform better than the previous one then the new model will not be registered and the pipeline will be cancelled. + * The third stage of the pipeline, **Deploy to ACI**, deploys the model to the QA environment in [Azure Container Instances](https://azure.microsoft.com/en-us/services/container-instances/). It then runs a *smoke test* to validate the deployment, i.e. sends a sample query to the scoring web service and verifies that it returns a response in the expected format. Wait until the pipeline finished and make sure there is a new model in the **ML Workspace**: