Skip to content

Commit 1d789c2

Browse files
authored
Fix default parameters to batch scoring pipeline + doc fixes (#310)
* fix default params in build batch score * docs * fix image * fix images * update to azure ml studio pics
1 parent 27b7d2a commit 1d789c2

6 files changed

+11
-8
lines changed

docs/getting_started.md

+9-6
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ If you would like to bring your own model code to use this template structure, f
1313
- [Create an Azure DevOps Service Connection for the Azure Resource Manager](#create-an-azure-devops-service-connection-for-the-azure-resource-manager)
1414
- [Create the IaC Pipeline](#create-the-iac-pipeline)
1515
- [Create an Azure DevOps Service Connection for the Azure ML Workspace](#create-an-azure-devops-service-connection-for-the-azure-ml-workspace)
16-
- [Set up Build, Release Trigger, and Release Multi-Stage Pipeline](#set-up-build-release-trigger-and-release-multi-stage-pipeline)
17-
- [Set up the Pipeline](#set-up-the-pipeline)
16+
- [Set up Build, Release Trigger, and Release Multi-Stage Pipeline](#set-up-build-release-trigger-and-release-multi-stage-pipelines)
17+
- [Set up the Model CI Training, Evaluation, and Registration Pipeline](##set-up-the-model-ci-training-evaluation-and-registration-pipeline)
18+
- [Set up the Release Deployment and/or Batch Scoring Pipelines](#set-up-the-release-deployment-andor-batch-scoring-pipelines)
1819
- [Further Exploration](#further-exploration)
1920
- [Deploy the model to Azure Kubernetes Service](#deploy-the-model-to-azure-kubernetes-service)
2021
- [Web Service Authentication on Azure Kubernetes Service](#web-service-authentication-on-azure-kubernetes-service)
@@ -166,7 +167,7 @@ And the pipeline artifacts:
166167

167168
![Build](./images/model-train-register-artifacts.png)
168169

169-
Also check the published training pipeline in the **mlops-AML-WS** workspace in [Azure Portal](https://portal.azure.com/):
170+
Also check the published training pipeline in the **mlops-AML-WS** workspace in [Azure Machine Learning Studio](https://ml.azure.com/):
170171

171172
![Training pipeline](./images/training-pipeline.png)
172173

@@ -254,7 +255,7 @@ To specify a particular build's model, set the `Model Train CI Build Id` paramet
254255

255256
Once your pipeline run begins, you can see the model name and version downloaded from the `Model-Train-Register-CI` pipeline.
256257

257-
![Build](./images/model-deploy-artifact-logs.png)
258+
![Build](./images/model-deploy-get-artifact-logs.png)
258259

259260
The pipeline has the following stage:
260261

@@ -289,7 +290,9 @@ The pipeline stages are summarized below:
289290

290291
#### Batch Score model
291292

292-
- Determine the model to be used based on the model name, model tag name and model tag value bound pipeline parameters.
293+
- Determine the model to be used based on the model name (required), model version, model tag name and model tag value bound pipeline parameters.
294+
- If run via Azure DevOps pipeline, the batch scoring pipeline will take the model name and version from the `Model-Train-Register-CI` build used as input.
295+
- If run locally without the model version, the batch scoring pipeline will use the model's latest version.
293296
- Trigger the *ML Batch Scoring Pipeline* and waits for it to complete.
294297
- This is an **agentless** job. The CI pipeline can wait for ML pipeline completion for hours or even days without using agent resources.
295298
- Use the scoring input data supplied via the SCORING_DATASTORE_INPUT_* configuration variables.
@@ -347,7 +350,7 @@ Set **WEBAPP_DEPLOYMENT_NAME** to the name of your Azure Web App. This app must
347350

348351
Delete the **ACI_DEPLOYMENT_NAME** variable.
349352

350-
The pipeline uses the [Create Image Script](../ml_service/util/create_scoring_image.py) to create a scoring image. The image will be registered under an Azure Container Registry instance that belongs to the Azure Machine Learning Service. Any dependencies that the scoring file depends on can also be packaged with the container with an image config. Learn more about how to create a container using the Azure ML SDK with the [Image class](https://docs.microsoft.com/en-us/python/api/azureml-core/azureml.core.image.image.image?view=azure-ml-py#create-workspace--name--models--image-config-) API documentation.
353+
The pipeline uses the [Azure ML CLI](../.pipelines/diabetes_regression-package-model-template.yml) to create a scoring image. The image will be registered under an Azure Container Registry instance that belongs to the Azure Machine Learning Service. Any dependencies that the scoring file depends on can also be packaged with the container with an image config. Learn more about how to create a container using the Azure ML SDK with the [Image class](https://docs.microsoft.com/en-us/python/api/azureml-core/azureml.core.image.image.image?view=azure-ml-py#create-workspace--name--models--image-config-) API documentation.
351354

352355
Make sure your webapp has the credentials to pull the image from the Azure Container Registry created by the Infrastructure as Code pipeline. Instructions can be found on the [Configure registry credentials in web app](https://docs.microsoft.com/en-us/azure/devops/pipelines/targets/webapp-on-container-linux?view=azure-devops&tabs=dotnet-core%2Cyaml#configure-registry-credentials-in-web-app) page. You'll need to run the pipeline once (including the Deploy to Webapp stage up to the `Create scoring image` step) so an image is present in the registry. After that, you can connect the Webapp to the Azure Container Registry in the Azure Portal.
353356

-102 KB
Binary file not shown.
51.8 KB
Loading

docs/images/trained-model.png

-32.1 KB
Loading

docs/images/training-pipeline.png

-30.6 KB
Loading

ml_service/pipelines/diabetes_regression_build_parallel_batchscore_pipeline.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -308,10 +308,10 @@ def get_scoring_pipeline(
308308
# tag/value pair bindable parameters so that they can be passed to
309309
# the pipeline when invoked either over REST or via the AML SDK.
310310
model_name_param = PipelineParameter(
311-
"model_name", default_value=env.model_name
311+
"model_name", default_value=" "
312312
) # NOQA: E501
313313
model_version_param = PipelineParameter(
314-
"model_version", default_value=env.model_version
314+
"model_version", default_value=" "
315315
) # NOQA: E501
316316
model_tag_name_param = PipelineParameter(
317317
"model_tag_name", default_value=" "

0 commit comments

Comments
 (0)