Skip to content

Commit d7f0dfa

Browse files
authored
Added instructions for testing and other clean up
1 parent c2d35aa commit d7f0dfa

File tree

1 file changed

+35
-27
lines changed

1 file changed

+35
-27
lines changed

articles/machine-learning/how-to-setup-mlops-azureml.md

Lines changed: 35 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -230,13 +230,40 @@ This step deploys the training pipeline to the Azure Machine Learning workspace
230230
* Resource Group for your Workspace including Storage Account, Container Registry, Application Insights, Keyvault and the Azure Machine Learning Workspace itself.
231231
* In the workspace, there's also a compute cluster created.
232232
233-
1. Now the Operationalizing Loop of the MLOps Architecture is deployed.
233+
1. Now the infrastructure for your MLOps project is deployed.
234234
![Screenshot of ADO Infra Pipeline screen.](./media/how-to-setup-mlops-azureml/ADO-infra-pipeline.png)
235235
236236
> [!NOTE]
237237
> The **Unable move and reuse existing repository to required location** warnings may be ignored.
238238
239-
## Deploying model training pipeline and moving to test environment
239+
## Sample Training and Deployment Scenario
240+
241+
The solution accelerator includes code and data for a sample end-to-end machine learning pipeline which runs a linear regression to predict taxi fares in NYC. The pipeline is made up of components, each serving different functions, which can be registered with the workspace, versioned, and reused with various inputs and outputs. Sample pipelines and workflows for the Computer Vision and NLP scenarios will have different steps and deployment steps.
242+
243+
This training pipeline contains the following steps:
244+
245+
**Prepare Data**
246+
- This component takes multiple taxi datasets (yellow and green) and merges/filters the data, and prepare the train/val and evaluation datasets.
247+
- Input: Local data under ./data/ (multiple .csv files)
248+
- Output: Single prepared dataset (.csv) and train/val/test datasets.
249+
250+
**Train Model**
251+
- This component trains a Linear Regressor with the training set.
252+
- Input: Training dataset
253+
- Output: Trained model (pickle format)
254+
255+
**Evaluate Model**
256+
- This component uses the trained model to predict taxi fares on the test set.
257+
- Input: ML model and Test dataset
258+
- Output: Performance of model and a deploy flag whether to deploy or not.
259+
- This component compares the performance of the model with all previous deployed models on the new test dataset and decides whether to promote or not model into production. Promoting model into production happens by registering the model in AML workspace.
260+
261+
**Register Model**
262+
- This component scores the model based on how accurate the predictions are in the test set.
263+
- Input: Trained model and the deploy flag.
264+
- Output: Registered model in Azure Machine Learning.
265+
266+
## Deploying model training pipeline
240267
241268
1. Go to ADO pipelines
242269
@@ -263,28 +290,9 @@ This step deploys the training pipeline to the Azure Machine Learning workspace
263290
> [!NOTE]
264291
> At this point, the infrastructure is configured and the Prototyping Loop of the MLOps Architecture is deployed. you're ready to move to our trained model to production.
265292
266-
## Moving to production environment and deploying model
267-
268-
**Prepare Data**
269-
- This component takes multiple taxi datasets (yellow and green) and merges/filters the data, and prepare the train/val and evaluation datasets.
270-
- Input: Local data under ./data/ (multiple .csv files)
271-
- Output: Single prepared dataset (.csv) and train/val/test datasets.
293+
## Deploying the Trained model
272294
273-
**Train Model**
274-
- This component trains a Linear Regressor with the training set.
275-
- Input: Training dataset
276-
- Output: Trained model (pickle format)
277-
278-
**Evaluate Model**
279-
- This component uses the trained model to predict taxi fares on the test set.
280-
- Input: ML model and Test dataset
281-
- Output: Performance of model and a deploy flag whether to deploy or not.
282-
- This component compares the performance of the model with all previous deployed models on the new test dataset and decides whether to promote or not model into production. Promoting model into production happens by registering the model in AML workspace.
283-
284-
**Register Model**
285-
- This component scores the model based on how accurate the predictions are in the test set.
286-
- Input: Trained model and the deploy flag.
287-
- Output: Registered model in Azure Machine Learning.
295+
This scenario includes prebuilt workflows for two approaches to deploying a trained model, batch scoring or a deploying a model to an endpoint for real-time scoring. You may run either or both of these workflows to test the performance of the model in your Azure ML workspace. IN this example we will be using real-time scoring.
288296
289297
### Deploy ML model endpoint
290298
1. Go to ADO pipelines
@@ -311,14 +319,14 @@ This step deploys the training pipeline to the Azure Machine Learning workspace
311319
312320
![Screenshot of Azure DevOps batch deploy script.](./media/how-to-setup-mlops-azureml/ADO-batch-pipeline.png)
313321
314-
> [!IMPORTANT]
315-
> If the run fails due to an existing online endpoint name, recreate the pipeline as described previously and change **[your endpoint-name]** to **[your endpoint-name (random number)]**
322+
> [!IMPORTANT]
323+
> If the run fails due to an existing online endpoint name, recreate the pipeline as described previously and change **[your endpoint-name]** to **[your endpoint-name (random number)]**
316324
317325
1. When the run completes, you'll see output similar to the following image:
318326

319327
![Screenshot of ADO Pipeline batch run result page.](./media/how-to-setup-mlops-azureml/ADO-batch-pipeline-run.png)
320-
321-
Now the Prototyping Loop is connected to the Operationalizing Loop of the MLOps Architecture and inference has been run.
328+
329+
1. To test this deployment, go to the **Endpoints** tab in your AzureML workspace, select the endpoint and click the **Test** Tab. You can use the sample input data located in the cloned repo at `/data/taxi-request.json` to test the endpoint.
322330

323331
## Clean up resources
324332

0 commit comments

Comments
 (0)