You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/machine-learning/how-to-setup-mlops-azureml.md
+35-27Lines changed: 35 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -230,13 +230,40 @@ This step deploys the training pipeline to the Azure Machine Learning workspace
230
230
* Resource Group for your Workspace including Storage Account, Container Registry, Application Insights, Keyvault and the Azure Machine Learning Workspace itself.
231
231
* In the workspace, there's also a compute cluster created.
232
232
233
-
1. Now the Operationalizing Loop of the MLOps Architecture is deployed.
233
+
1. Now the infrastructure for your MLOps project is deployed.
234
234

235
235
236
236
> [!NOTE]
237
237
> The **Unable move and reuse existing repository to required location** warnings may be ignored.
238
238
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
240
267
241
268
1. Go to ADO pipelines
242
269
@@ -263,28 +290,9 @@ This step deploys the training pipeline to the Azure Machine Learning workspace
263
290
> [!NOTE]
264
291
> 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.
265
292
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
272
294
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.
288
296
289
297
### Deploy ML model endpoint
290
298
1. Go to ADO pipelines
@@ -311,14 +319,14 @@ This step deploys the training pipeline to the Azure Machine Learning workspace
311
319
312
320

313
321
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)]**
316
324
317
325
1. When the run completes, you'll see output similar to the following image:
318
326
319
327

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, selecttheendpoint 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.
0 commit comments