Skip to content

Commit 57f8f51

Browse files
committed
fix
1 parent 7c55d6c commit 57f8f51

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

articles/machine-learning/how-to-deploy-mlflow-models-online-progressive.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,12 @@ Let's imagine that there is a new version of the model created by the developmen
467467
az ml model create --name $MODEL_NAME --type "mlflow_model" --path "model"
468468
```
469469
470+
Let's get the version number of the new model:
471+
472+
```azurecli
473+
VERSION=$(az ml model show -n heart-classifier --label latest | jq -r ".version")
474+
```
475+
470476
# [Python (Azure ML SDK)](#tab/sdk)
471477
472478
```python
@@ -476,6 +482,7 @@ Let's imagine that there is a new version of the model created by the developmen
476482
model = ml_client.models.create_or_update(
477483
Model(name=model_name, path=model_local_path, type=AssetTypes.MLFLOW_MODEL)
478484
)
485+
version = model.version
479486
```
480487
481488
# [Python (MLflow SDK)](#tab/mlflow)
@@ -498,13 +505,19 @@ Let's imagine that there is a new version of the model created by the developmen
498505
499506
```yml
500507
$schema: https://azuremlschemas.azureedge.net/latest/managedOnlineDeployment.schema.json
501-
name: xgboost-model-new
508+
name: xgboost-model
502509
endpoint_name: heart-classifier-edp
503510
model: azureml:heart-classifier@latest
504511
instance_type: Standard_DS2_v2
505512
instance_count: 1
506513
```
507514
515+
We will name the deployment as follows:
516+
517+
```azurecli
518+
GREEN_DEPLOYMENT_NAME="xgboost-model-$VERSION"
519+
```
520+
508521
# [Python (Azure ML SDK)](#tab/sdk)
509522
510523
```python
@@ -554,7 +567,7 @@ Let's imagine that there is a new version of the model created by the developmen
554567
# [Azure CLI](#tab/cli)
555568
556569
```azurecli
557-
az ml online-deployment create --endpoint-name $ENDPOINT_NAME -f green-deployment.yml
570+
az ml online-deployment create -n $GREEN_DEPLOYMENT_NAME --endpoint-name $ENDPOINT_NAME -f green-deployment.yml
558571
```
559572
560573
# [Python (Azure ML SDK)](#tab/sdk)
@@ -611,7 +624,7 @@ One we are confident with the new deployment, we can update the traffic to route
611624
# [Azure CLI](#tab/cli)
612625
613626
```azurecli
614-
az ml online-endpoint update --name $ENDPOINT_NAME --traffic "default=90 xgboost-model-new=10"
627+
az ml online-endpoint update --name $ENDPOINT_NAME --traffic "default=90 $GREEN_DEPLOYMENT_NAME=10"
615628
```
616629
617630
# [Python (Azure ML SDK)](#tab/sdk)
@@ -662,7 +675,7 @@ One we are confident with the new deployment, we can update the traffic to route
662675
# [Azure CLI](#tab/cli)
663676
664677
```azurecli
665-
az ml online-endpoint update --name $ENDPOINT_NAME --traffic "default=0 xgboost-model-new=100"
678+
az ml online-endpoint update --name $ENDPOINT_NAME --traffic "default=0 $GREEN_DEPLOYMENT_NAME=100"
666679
```
667680
668681
# [Python (Azure ML SDK)](#tab/sdk)

0 commit comments

Comments
 (0)