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
@@ -28,7 +28,7 @@ Deployment in the studio consists of the following steps:
28
28
1. (Optional) Configure the entry script.
29
29
1. Deploy the model to a compute target.
30
30
31
-
You can also deploy models directly in the designer to skip model registration and file download steps. This can be useful for rapid deployment. For more information see,[Deploy a model with the designer](tutorial-designer-automobile-price-deploy.md).
31
+
You can also deploy models directly in the designer to skip model registration and file download steps. This can be useful for rapid deployment. For more information, see [Deploy a model with the designer](tutorial-designer-automobile-price-deploy.md).
32
32
33
33
Models trained in the designer can also be deployed through the SDK or command-line interface (CLI). For more information, see [Deploy your existing model with Azure Machine Learning](how-to-deploy-and-where.md).
34
34
@@ -37,6 +37,7 @@ Models trained in the designer can also be deployed through the SDK or command-l
* A completed training pipeline containing one of following components:
40
+
40
41
-[Train Model Component](../algorithm-module-reference/train-model.md)
41
42
-[Train Anomaly Detection Model component](../algorithm-module-reference/train-anomaly-detection-model.md)
42
43
-[Train Clustering Model component](../algorithm-module-reference/train-clustering-model.md)
@@ -45,47 +46,59 @@ Models trained in the designer can also be deployed through the SDK or command-l
45
46
-[Train Vowpal Wabbit Model component](../algorithm-module-reference/train-vowpal-wabbit-model.md)
46
47
-[Train Wide & Deep Model component](../algorithm-module-reference/train-wide-and-deep-recommender.md)
47
48
49
+
To learn more about pipelines, see [What are Azure Machine Learning pipelines?](../concept-ml-pipelines.md)
50
+
48
51
## Register the model
49
52
50
53
After the training pipeline completes, register the trained model to your Azure Machine Learning workspace to access the model in other projects.
51
54
52
-
1. Select the [Train Model component](../algorithm-module-reference/train-model.md).
53
-
1. Select the **Outputs + logs** tab in the right pane.
54
-
1. Select the **Register Model** icon .
55
+
1. Sign in to [Azure Machine Learning studio](https://ml.azure.com), and select your completed pipeline.
56
+
57
+
1. Double-click the [Train Model component](../algorithm-module-reference/train-model.md) to open the details pane.
58
+
59
+
1. Select the **Outputs + logs** tab in the details pane.
60
+
61
+
1. Select **+ Register model**.
55
62
56
-

63
+
:::image type="content" source="./media/how-to-deploy-model-designer/train-model-right-pane.png" alt-text="Screenshot of right pane of Train Model component." lightbox="./media/how-to-deploy-model-designer/train-model-right-pane.png":::
57
64
58
65
1. Enter a name for your model, then select **Save**.
59
66
60
67
After registering your model, you can find it in the **Models** asset page in the studio.
61
-
62
-

68
+
69
+
:::image type="content" source="./media/how-to-deploy-model-designer/models-asset-page.png" alt-text="Screenshot of registered model in the Models asset page.":::
63
70
64
71
## Download the entry script file and conda dependencies file
65
72
66
73
You need the following files to deploy a model in Azure Machine Learning studio:
67
74
68
-
-**Entry script file** - loads the trained model, processes input data from requests, does real-time inferences, and returns the result. The designer automatically generates a `score.py` entry script file when the **Train Model** component completes.
75
+
-**Entry script file**: loads the trained model, processes input data from requests, does real-time inferences, and returns the result. The designer automatically generates a `score.py` entry script file when the **Train Model** component completes.
69
76
70
-
-**Conda dependencies file** - specifies which pip and conda packages your webservice depends on. The designer automatically creates a `conda_env.yaml` file when the **Train Model** component completes.
77
+
-**Conda dependencies file**: specifies which pip and conda packages your webservice depends on. The designer automatically creates a `conda_env.yaml` file when the **Train Model** component completes.
71
78
72
79
You can download these two files in the right pane of the **Train Model** component:
73
80
74
81
1. Select the **Train Model** component.
82
+
75
83
1. In the **Outputs + logs** tab, select the folder `trained_model_outputs`.
84
+
76
85
1. Download the `conda_env.yaml` file and `score.py` file.
77
86
78
-

87
+
:::image type="content" source="./media/how-to-deploy-model-designer/download-artifacts-in-right-pane.png" alt-text="Screenshot of download files for deployment in right pane." lightbox="./media/how-to-deploy-model-designer/download-artifacts-in-right-pane.png":::
79
88
80
89
Alternatively, you can download the files from the **Models** asset page after registering your model:
81
90
82
91
1. Navigate to the **Models** asset page.
92
+
83
93
1. Select the model you want to deploy.
94
+
84
95
1. Select the **Artifacts** tab.
96
+
85
97
1. Select the `trained_model_outputs` folder.
98
+
86
99
1. Download the `conda_env.yaml` file and `score.py` file.
87
100
88
-

101
+
:::image type="content" source="./media/how-to-deploy-model-designer/download-artifacts-in-models-page.png" alt-text="Screenshot of download files for deployment in model detail page." lightbox="./media/how-to-deploy-model-designer/download-artifacts-in-models-page.png":::
89
102
90
103
> [!NOTE]
91
104
> The `score.py` file provides nearly the same functionality as the **Score Model** components. However, some components like [Score SVD Recommender](../algorithm-module-reference/score-svd-recommender.md), [Score Wide and Deep Recommender](../algorithm-module-reference/score-wide-and-deep-recommender.md), and [Score Vowpal Wabbit Model](../algorithm-module-reference/score-vowpal-wabbit-model.md) have parameters for different scoring modes. You can also change those parameters in the entry script.
@@ -97,21 +110,25 @@ Alternatively, you can download the files from the **Models** asset page after r
97
110
After downloading the necessary files, you're ready to deploy the model.
98
111
99
112
1. In the **Models** asset page, select the registered model.
100
-
1. Select **Deploy** and select **Deploy to web service**.
101
-

113
+
114
+
1. Select **Use this model**, then select **Web service** from the drop-down menu.
115
+
116
+
:::image type="content" source="./media/how-to-deploy-model-designer/open-deploy-wizard.png" alt-text="Screenshot of deploy button in model asset page." lightbox="./media/how-to-deploy-model-designer/open-deploy-wizard.png":::
117
+
102
118
1. In the configuration menu, enter the following information:
103
119
104
120
- Input a name for the endpoint.
105
-
- Select to deploy the model to [Azure Kubernetes Service](how-to-deploy-azure-kubernetes-service.md) or [Azure Container Instance](how-to-deploy-azure-container-instance.md).
121
+
- Select the [AksCompute](how-to-deploy-azure-kubernetes-service.md) or [Azure Container Instance](how-to-deploy-azure-container-instance.md) compute type.
122
+
- Select a compute name.
106
123
- Upload the `score.py` for the **Entry script file**.
107
124
- Upload the `conda_env.yml` for the **Conda dependencies file**.
108
125
109
126
>[!TIP]
110
-
> In **Advanced** setting, you can set CPU/Memory capacity and other parameters for deployment. These settings are important for certain models such as PyTorch models, which consume considerable amount of memery (about 4 GB).
127
+
> In the **Advanced** setting, you can set CPU/Memory capacity and other parameters for deployment. These settings are important for certain models such as PyTorch models, which consume considerable amount of memory (about 4 GB).
111
128
112
129
1. Select **Deploy** to deploy your model as an online endpoint.
113
130
114
-

131
+
:::image type="content" source="./media/how-to-deploy-model-designer/deploy-model.png" alt-text="Screenshot of deploy model in model asset page.":::
When consuming computer vision related online endpoints, you need to convert images to bytes, since web service only accepts string as input. Following is the sample code:
149
166
@@ -203,12 +220,11 @@ with open(data_file_path, 'w') as f:
203
220
204
221
Some components in the designer like [Score SVD Recommender](../algorithm-module-reference/score-svd-recommender.md), [Score Wide and Deep Recommender](../algorithm-module-reference/score-wide-and-deep-recommender.md), and [Score Vowpal Wabbit Model](../algorithm-module-reference/score-vowpal-wabbit-model.md) have parameters for different scoring modes.
205
222
206
-
In this section, you learn how to update these parameters in the entry script file too.
223
+
In this section, you learn how to update these parameters in the entry script file.
207
224
208
-
The following example updates the default behavior for a trained **Wide & Deep recommender** model. By default, the `score.py` file tells the web service to predict ratings between users and items.
209
-
210
-
You can modify the entry script file to make item recommendations, and return recommended items by changing the `recommender_prediction_kind` parameter.
225
+
The following example updates the default behavior for a trained **Wide & Deep Recommender** model. By default, the `score.py` file tells the web service to predict ratings between users and items.
211
226
227
+
You can modify the entry script file to make item recommendations, and to return recommended items, by changing the `recommender_prediction_kind` parameter.
212
228
213
229
```python
214
230
import os
@@ -260,22 +276,22 @@ def run(data):
260
276
return json.dumps(result_df.to_dict("list"))
261
277
```
262
278
263
-
For **Wide & Deep recommender** and **Vowpal Wabbit** models, you can configure the scoring mode parameter using the following methods:
279
+
For **Wide & Deep Recommender** and **Vowpal Wabbit** models, you can configure the scoring mode parameter by using the following methods:
264
280
265
281
- The parameter names are the lowercase and underscore combinations of parameter names for [Score Vowpal Wabbit Model](../algorithm-module-reference/score-vowpal-wabbit-model.md) and [Score Wide and Deep Recommender](../algorithm-module-reference/score-wide-and-deep-recommender.md);
266
-
- Modetype parameter values are strings of the corresponding option names. Take **Recommender prediction kind** in the above codes as example, the value can be `'Rating Prediction'`or `'Item Recommendation'`. Other values are not allowed.
282
+
- Mode-type parameter values are strings of the corresponding option names. Take **Recommender prediction kind** in the preceding codes as an example, the value can be `'Rating Prediction'`or `'Item Recommendation'`. Other values aren't allowed.
267
283
268
-
For **SVD recommender** trained model, the parameter names and values maybe less obvious, and you can look up the tables below to decide how to set parameters.
284
+
For **SVD Recommender** trained model, the parameter names and values might be less obvious, and you can look up the following tables to decide how to set parameters.
269
285
270
-
| Parameter name in [Score SVD Recommender](../algorithm-module-reference/score-svd-recommender.md)| Parameter name in the entry script file |
286
+
| Parameter name in **Score SVD Recommender**| Parameter name in the entry script file |
| Minimum size of the recommendation pool for a single user | min_recommendation_pool_size |
275
291
| Maximum number of items to recommend to a user | max_recommended_item_count |
276
-
| Whether to return the predicted ratings of the items along with the labels | return_ratings |
292
+
| Whether to return the predicted ratings of the items along with the labels | return_ratings |
277
293
278
-
The following code shows you how to set parameters for an SVD recommender, which uses all six parameters to recommend rated items with predicted ratings attached.
294
+
The following code shows how to set parameters for an SVD Recommender, which uses all six parameters to recommend rated items with predicted ratings attached.
279
295
280
296
```python
281
297
score_params =dict(
@@ -294,12 +310,11 @@ score_params = dict(
294
310
)
295
311
```
296
312
313
+
## Related content
297
314
298
-
## Next steps
299
-
300
-
*[Train a model in the designer](tutorial-designer-automobile-price-train-score.md)
301
-
*[Deploy models with Azure Machine Learning SDK](how-to-deploy-and-where.md)
302
-
*[Troubleshoot a failed deployment](how-to-troubleshoot-deployment.md)
303
-
*[Deploy to Azure Kubernetes Service](how-to-deploy-azure-kubernetes-service.md)
315
+
*[Tutorial: Train a no-code regression model using designer](tutorial-designer-automobile-price-train-score.md)
316
+
*[Deploy machine learning models to Azure](how-to-deploy-and-where.md)
317
+
*[Troubleshooting remote model deployment](how-to-troubleshoot-deployment.md)
318
+
*[Deploy a model to an Azure Kubernetes Service cluster](how-to-deploy-azure-kubernetes-service.md)
304
319
*[Create client applications to consume web services](how-to-consume-web-service.md)
305
-
*[Update web service](how-to-deploy-update-web-service.md)
320
+
*[Update a deployed web service](how-to-deploy-update-web-service.md)
0 commit comments