Skip to content

Commit 4eeb5a3

Browse files
authored
Merge pull request #99026 from PeterCLu/plu-retrain-pipeline
Retrain pipelines with published pipelines
2 parents b6b8600 + ee1a3f2 commit 4eeb5a3

File tree

8 files changed

+134
-0
lines changed

8 files changed

+134
-0
lines changed
Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
---
2+
title: Retrain models using Azure Machine Learning designer (preview)
3+
titleSuffix: Azure Machine Learning
4+
description: Learn how to retrain models using published pipelines in Azure Machine Learning designer (preview).
5+
services: machine-learning
6+
ms.service: machine-learning
7+
ms.subservice: core
8+
ms.topic: how-to
9+
ms.author: peterlu
10+
author: peterclu
11+
ms.date: 12/15/2019
12+
---
13+
14+
# Retrain models with Azure Machine Learning designer (preview)
15+
[!INCLUDE [applies-to-skus](../../../includes/aml-applies-to-basic-enterprise-sku.md)]
16+
17+
In this how-to, you learn how to use Azure Machine Learning designer to retrain a machine learning model. You can use published pipelines to help you do this.
18+
19+
Published pipelines let you reuse existing pipelines for repeatability and automation.
20+
21+
In this article you learn how to:
22+
23+
> [!div class="checklist"]
24+
> * Train a machine learning model.
25+
> * Create a pipeline parameter.
26+
> * Publish your training pipeline.
27+
> * Retrain your model.
28+
29+
## Prerequisites
30+
31+
* An Azure subscription. If you don’t have an Azure subscription, create a [free account](https://aka.ms/AMLFree).
32+
33+
* An Azure Machine Learning workspace with the Enterprise SKU.
34+
35+
This how-to assumes basic knowledge of building pipelines in the designer. For a guided introduction to the designer, complete the [tutorial](tutorial-designer-automobile-price-train-score.md).
36+
37+
### Sample pipeline
38+
39+
The pipeline used in this article is an altered version of the one found in [Sample 3 - Income Prediction](how-to-designer-sample-classification-predict-income.md). It uses the [Import Data](../algorithm-module-reference/import-data.md) module instead of the sample dataset to show you how to train a model using your own data.
40+
41+
![Screenshot showing the modified sample pipeline with a box highlighting the Import Data module](./media/how-to-retrain-designer/modified-sample-pipeline.png)
42+
43+
## Train a machine learning model
44+
45+
In order to retrain a model, you first need an initial model. In this section, you learn how to train a model and access it using the designer.
46+
47+
1. Select the **Import Data** module.
48+
1. In the properties pane, specify a data source.
49+
50+
![Screenshot showing a sample configuration of the Import Data module](./media/how-to-retrain-designer/import-data-settings.png)
51+
52+
For this example, the data is stored in an [Azure datastore](how-to-access-data.md). If you don't already have a datastore, you can create one now by selecting **New datastore**.
53+
54+
1. Specify the path to your data. You can also select **Browse path** to visually browse your datastore.
55+
56+
1. Select **Run** at the top of the canvas to run the pipeline.
57+
58+
> [!NOTE]
59+
> If you have already set a default compute for this pipeline draft, the pipeline will run automatically. Otherwise, you can follow the prompts in the settings pane that appears to set one now.
60+
61+
### Locate your trained model
62+
63+
By default, the designer saves all pipeline output, including trained models, to the default storage account. You can access storage through the portal or programatically. You can also access the trained model directly in the designer:
64+
65+
1. Wait for the pipeline to finish running.
66+
67+
1. Select the **Train Model** module.
68+
69+
1. In the settings pane, select **Outputs**.
70+
71+
1. Select **Trained_model** to download the model.
72+
73+
![Screenshot showing how to download the trained model](./media/how-to-retrain-designer/download-model.png)
74+
75+
## Create a pipeline parameter
76+
77+
You can add pipeline parameters to dynamically set variables at runtime. For this pipeline, add a pipeline parameter for the training data path so that you can retrain your model on new data as its made available.
78+
79+
1. Select the **Import Data** module.
80+
1. In the settings pane, select the ellipses above the **Path** field.
81+
1. Select **Add to pipeline parameter**.
82+
1. Provide a parameter name and default value.
83+
84+
> [!NOTE]
85+
> You can inspect and edit your pipeline parameters by selecting the **Settings gear icon** next to the title of your pipeline draft.
86+
87+
[Screenshot showing how to create a pipeline parameter](./media/how-to-retrain-designer/add-pipeline-parameter.png)
88+
89+
## Publish a training pipeline
90+
91+
When you publish a pipeline, it creates a pipeline endpoint. Pipeline endpoints let you reuse and manage and your pipelines for repeatability and automation. In this scenario, you can publish your training pipeline to reuse it for retraining.
92+
93+
1. Select **Publish** above the designer canvas.
94+
1. Select, or create, a new pipeline endpoint.
95+
96+
> [!NOTE]
97+
> You can publish multiple pipelines to a single pipeline endpoint. Each pipeline is given a version number, which you can specify when you call the pipeline endpoint.
98+
99+
1. Select **Publish**.
100+
101+
## Retrain your model
102+
103+
Now that you have a published training pipeline, you can use it to retrain your model using new data. You can submit runs from a pipeline endpoint either in the portal or programatically.
104+
105+
### Submit runs with the designer
106+
107+
Use the following steps to submit a pipeline endpoint run from the designer:
108+
109+
1. Go to the **Endpoints** page.
110+
111+
1. Select the **Pipeline endpoints** tab.
112+
113+
1. Select your pipeline endpoint.
114+
115+
1. Select the **Published pipelines** tab.
116+
117+
1. Select the pipeline you want to run.
118+
119+
1. Select **Run**.
120+
121+
1. In the setup dialog, you can specify a new input data path value, which points to your new dataset.
122+
123+
![Screenshot showing how to set up a parameterized pipeline run in the designer](./media/how-to-retrain-designer/published-pipeline-run.png)
124+
125+
### Submit runs with code
126+
127+
There are multiple ways to access your REST endpoint programatically depending on your development environment. You can find code samples that show you how to submit pipeline runs with parameters in the **Consume** tab of your pipeline.
128+
129+
## Next steps
130+
131+
Follow the designer [tutorial](tutorial-designer-automobile-price-train-score.md) to train and deploy a regression model.
40.5 KB
Loading
55.6 KB
Loading
16 KB
Loading
78.9 KB
Loading
50.9 KB
Loading
175 KB
Loading

articles/machine-learning/service/toc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,9 @@
330330
- name: 'Azure Pipelines for CI/CD'
331331
displayName: continuous, integration, delivery
332332
href: /azure/devops/pipelines/targets/azure-machine-learning?context=azure/machine-learning/service/context/ml-context
333+
- name: 'Designer: Retrain using published pipelines'
334+
displayName: retrain, designer, published pipeline
335+
href: how-to-retrain-designer.md
333336
- name: Manage resource quotas
334337
displayName: limits
335338
href: how-to-manage-quotas.md

0 commit comments

Comments
 (0)