Skip to content

Commit ecd6f79

Browse files
Merge pull request #220521 from santiagxf/santiagxf-patch-3
Update how-to-nlp-processing-batch.md
2 parents 3448e23 + f4c0226 commit ecd6f79

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

articles/machine-learning/how-to-nlp-processing-batch.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ In this example, we are going to learn how to deploy a deep learning model based
6262

6363
Batch Endpoint can only deploy registered models. In this case, we need to publish the model we have just downloaded from HuggingFace. You can skip this step if the model you are trying to deploy is already registered.
6464

65-
# [Azure ML CLI](#tab/cli)
65+
# [Azure CLI](#tab/cli)
6666

67-
```bash
67+
```azurecli
6868
MODEL_NAME='bart-text-summarization'
6969
az ml model create --name $MODEL_NAME --type "custom_model" --path "bart-text-summarization/model"
7070
```
7171

72-
# [Azure ML SDK for Python](#tab/sdk)
72+
# [Python](#tab/sdk)
7373

7474
```python
7575
model_name = 'bart-text-summarization'
@@ -136,11 +136,11 @@ One the scoring script is created, it's time to create a batch deployment for it
136136

137137
1. We need to indicate over which environment we are going to run the deployment. In our case, our model runs on `TensorFlow`. Azure Machine Learning already has an environment with the required software installed, so we can reutilize this environment. We are just going to add a couple of dependencies in a `conda.yml` file including the libraries `transformers` and `datasets`.
138138

139-
# [Azure ML CLI](#tab/cli)
139+
# [Azure CLI](#tab/cli)
140140

141141
No extra step is required for the Azure ML CLI. The environment definition will be included in the deployment file.
142142

143-
# [Azure ML SDK for Python](#tab/sdk)
143+
# [Python](#tab/sdk)
144144

145145
Let's get a reference to the environment:
146146

@@ -156,7 +156,7 @@ One the scoring script is created, it's time to create a batch deployment for it
156156
> [!NOTE]
157157
> This example assumes you have an endpoint created with the name `text-summarization-batch` and a compute cluster with name `cpu-cluster`. If you don't, please follow the steps in the doc [Use batch endpoints for batch scoring](how-to-use-batch-endpoint.md).
158158
159-
# [Azure ML CLI](#tab/cli)
159+
# [Azure CLI](#tab/cli)
160160

161161
To create a new deployment under the created endpoint, create a `YAML` configuration like the following:
162162

@@ -188,12 +188,12 @@ One the scoring script is created, it's time to create a batch deployment for it
188188
189189
Then, create the deployment with the following command:
190190
191-
```bash
191+
```azurecli
192192
DEPLOYMENT_NAME="text-summarization-hfbart"
193193
az ml batch-deployment create -f endpoint.yml
194194
```
195195

196-
# [Azure ML SDK for Python](#tab/sdk)
196+
# [Python](#tab/sdk)
197197

198198
To create a new deployment with the indicated environment and scoring script use the following code:
199199

@@ -231,13 +231,13 @@ One the scoring script is created, it's time to create a batch deployment for it
231231
232232
3. Although you can invoke a specific deployment inside of an endpoint, you will usually want to invoke the endpoint itself and let the endpoint decide which deployment to use. Such deployment is named the "default" deployment. This gives you the possibility of changing the default deployment and hence changing the model serving the deployment without changing the contract with the user invoking the endpoint. Use the following instruction to update the default deployment:
233233

234-
# [Azure ML CLI](#tab/cli)
234+
# [Azure CLI](#tab/cli)
235235

236-
```bash
236+
```azurecli
237237
az ml batch-endpoint update --name $ENDPOINT_NAME --set defaults.deployment_name=$DEPLOYMENT_NAME
238238
```
239239

240-
# [Azure ML SDK for Python](#tab/sdk)
240+
# [Python](#tab/sdk)
241241

242242
```python
243243
endpoint.defaults.deployment_name = deployment.name

0 commit comments

Comments
 (0)