diff --git a/docs/getting_started.md b/docs/getting_started.md index 629e0dc2..430ae0a6 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -13,8 +13,9 @@ If you would like to bring your own model code to use this template structure, f - [Create an Azure DevOps Service Connection for the Azure Resource Manager](#create-an-azure-devops-service-connection-for-the-azure-resource-manager) - [Create the IaC Pipeline](#create-the-iac-pipeline) - [Create an Azure DevOps Service Connection for the Azure ML Workspace](#create-an-azure-devops-service-connection-for-the-azure-ml-workspace) -- [Set up Build, Release Trigger, and Release Multi-Stage Pipeline](#set-up-build-release-trigger-and-release-multi-stage-pipeline) - - [Set up the Pipeline](#set-up-the-pipeline) +- [Set up Build, Release Trigger, and Release Multi-Stage Pipeline](#set-up-build-release-trigger-and-release-multi-stage-pipelines) + - [Set up the Model CI Training, Evaluation, and Registration Pipeline](##set-up-the-model-ci-training-evaluation-and-registration-pipeline) + - [Set up the Release Deployment and/or Batch Scoring Pipelines](#set-up-the-release-deployment-andor-batch-scoring-pipelines) - [Further Exploration](#further-exploration) - [Deploy the model to Azure Kubernetes Service](#deploy-the-model-to-azure-kubernetes-service) - [Web Service Authentication on Azure Kubernetes Service](#web-service-authentication-on-azure-kubernetes-service) @@ -166,7 +167,7 @@ And the pipeline artifacts: ![Build](./images/model-train-register-artifacts.png) -Also check the published training pipeline in the **mlops-AML-WS** workspace in [Azure Portal](https://portal.azure.com/): +Also check the published training pipeline in the **mlops-AML-WS** workspace in [Azure Machine Learning Studio](https://ml.azure.com/): ![Training pipeline](./images/training-pipeline.png) @@ -254,7 +255,7 @@ To specify a particular build's model, set the `Model Train CI Build Id` paramet Once your pipeline run begins, you can see the model name and version downloaded from the `Model-Train-Register-CI` pipeline. -![Build](./images/model-deploy-artifact-logs.png) +![Build](./images/model-deploy-get-artifact-logs.png) The pipeline has the following stage: @@ -289,7 +290,9 @@ The pipeline stages are summarized below: #### Batch Score model -- Determine the model to be used based on the model name, model tag name and model tag value bound pipeline parameters. +- Determine the model to be used based on the model name (required), model version, model tag name and model tag value bound pipeline parameters. + - 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. + - If run locally without the model version, the batch scoring pipeline will use the model's latest version. - Trigger the *ML Batch Scoring Pipeline* and waits for it to complete. - This is an **agentless** job. The CI pipeline can wait for ML pipeline completion for hours or even days without using agent resources. - 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 Delete the **ACI_DEPLOYMENT_NAME** variable. -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. +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. 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. diff --git a/docs/images/model-deploy-artifact-logs.PNG b/docs/images/model-deploy-artifact-logs.PNG deleted file mode 100644 index 2dfee305..00000000 Binary files a/docs/images/model-deploy-artifact-logs.PNG and /dev/null differ diff --git a/docs/images/model-deploy-get-artifact-logs.png b/docs/images/model-deploy-get-artifact-logs.png new file mode 100644 index 00000000..2249a8d3 Binary files /dev/null and b/docs/images/model-deploy-get-artifact-logs.png differ diff --git a/docs/images/trained-model.png b/docs/images/trained-model.png index 3753fd7d..5bea4fe2 100644 Binary files a/docs/images/trained-model.png and b/docs/images/trained-model.png differ diff --git a/docs/images/training-pipeline.png b/docs/images/training-pipeline.png index cbdaf048..48854513 100644 Binary files a/docs/images/training-pipeline.png and b/docs/images/training-pipeline.png differ diff --git a/ml_service/pipelines/diabetes_regression_build_parallel_batchscore_pipeline.py b/ml_service/pipelines/diabetes_regression_build_parallel_batchscore_pipeline.py index ac3d3407..5a0f0125 100644 --- a/ml_service/pipelines/diabetes_regression_build_parallel_batchscore_pipeline.py +++ b/ml_service/pipelines/diabetes_regression_build_parallel_batchscore_pipeline.py @@ -308,10 +308,10 @@ def get_scoring_pipeline( # tag/value pair bindable parameters so that they can be passed to # the pipeline when invoked either over REST or via the AML SDK. model_name_param = PipelineParameter( - "model_name", default_value=env.model_name + "model_name", default_value=" " ) # NOQA: E501 model_version_param = PipelineParameter( - "model_version", default_value=env.model_version + "model_version", default_value=" " ) # NOQA: E501 model_tag_name_param = PipelineParameter( "model_tag_name", default_value=" "