@@ -158,7 +158,7 @@ Follow these steps to deploy an MLflow model to a batch endpoint for running bat
158
158
159
159
` ` ` azurecli
160
160
ENDPOINT_NAME='heart-classifier-batch'
161
- az ml batch-endpoint create -f endpoint.yml
161
+ az ml batch-endpoint create -n $ENDPOINT_NAME - f endpoint.yml
162
162
```
163
163
164
164
# [ Python] ( #tab/sdk )
@@ -170,6 +170,11 @@ Follow these steps to deploy an MLflow model to a batch endpoint for running bat
170
170
name = " heart-classifier-batch" ,
171
171
description = " A heart condition classifier for batch inference" ,
172
172
)
173
+ ```
174
+
175
+ Then, create the endpoint with the following command:
176
+
177
+ ``` python
173
178
ml_client.batch_endpoints.begin_create_or_update(endpoint)
174
179
```
175
180
@@ -203,12 +208,12 @@ Follow these steps to deploy an MLflow model to a batch endpoint for running bat
203
208
204
209
` ` ` azurecli
205
210
DEPLOYMENT_NAME="classifier-xgboost-mlflow"
206
- az ml batch-deployment create -f endpoint.yml --set-default
211
+ az ml batch-deployment create -n $DEPLOYMENT_NAME - f endpoint.yml
207
212
```
208
213
209
214
# [ Python] ( #tab/sdk )
210
215
211
- To create a new deployment under the created endpoint, use the following script :
216
+ To create a new deployment under the created endpoint, first define the deployment :
212
217
213
218
``` python
214
219
deployment = BatchDeployment(
@@ -225,15 +230,12 @@ Follow these steps to deploy an MLflow model to a batch endpoint for running bat
225
230
retry_settings = BatchRetrySettings(max_retries = 3 , timeout = 300 ),
226
231
logging_level = " info" ,
227
232
)
228
- ml_client.batch_deployments.begin_create_or_update(deployment)
229
233
```
230
234
231
- Once created, you will need to set this deployment as the default one :
235
+ Then, create the deployment with the following command :
232
236
233
237
``` python
234
- endpoint = ml_client.batch_endpoints.get(endpoint.name)
235
- endpoint.defaults.deployment_name = deployment.name
236
- ml_client.batch_endpoints.begin_create_or_update(endpoint)
238
+ ml_client.batch_deployments.begin_create_or_update(deployment)
237
239
```
238
240
---
239
241
@@ -251,6 +253,7 @@ Follow these steps to deploy an MLflow model to a batch endpoint for running bat
251
253
# [ Python] ( #tab/sdk )
252
254
253
255
``` python
256
+ endpoint = ml_client.batch_endpoints.get(endpoint.name)
254
257
endpoint.defaults.deployment_name = deployment.name
255
258
ml_client.batch_endpoints.begin_create_or_update(endpoint)
256
259
```
0 commit comments