Skip to content

Commit e035154

Browse files
authored
Update how-to-use-low-priority-batch.md
1 parent a0f8cad commit e035154

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

articles/machine-learning/how-to-use-low-priority-batch.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,13 @@ Azure Machine Learning Batch Deployments provides several capabilities that make
2929

3030
- Batch deployment jobs consume low priority VMs by running on Azure Machine Learning compute clusters created with low priority VMs. Once a deployment is associated with a low priority VMs' cluster, all the jobs produced by such deployment will use low priority VMs. Per-job configuration is not possible.
3131
- Batch deployment jobs automatically seek the target number of VMs in the available compute cluster based on the number of tasks to submit. If VMs are preempted or unavailable, batch deployment jobs attempt to replace the lost capacity by queuing the failed tasks to the cluster.
32-
- When a job is interrupted, it is resubmitted to run again. Rescheduling is done at the mini batch level, regardless of the progress. No checkpointing capability is provided.
3332
- Low priority VMs have a separate vCPU quota that differs from the one for dedicated VMs. Low-priority cores per region have a default limit of 100 to 3,000, depending on your subscription offer type. The number of low-priority cores per subscription can be increased and is a single value across VM families. See [Azure Machine Learning compute quotas](how-to-manage-quotas.md#azure-machine-learning-compute).
3433

3534
## Considerations and use cases
3635

3736
Many batch workloads are a good fit for low priority VMs. Although this may introduce further execution delays when deallocation of VMs occurs, the potential drops in capacity can be tolerated at expenses of running with a lower cost if there is flexibility in the time jobs have to complete.
3837

39-
Since batch endpoints distribute the work at the mini-batch level, deallocation only impacts those mini-batches that are currently being processed and not finished on the affected node.
38+
When **deploying models** under batch endpoints, rescheduling can be done at the mini batch level. That has the extra benefit that deallocation only impacts those mini-batches that are currently being processed and not finished on the affected node. Every completed progress is kept.
4039

4140
## Creating batch deployments with low priority VMs
4241

@@ -99,19 +98,19 @@ Once you have the new compute created, you can create or update your deployment
9998
endpoint_name: heart-classifier-batch
10099
name: classifier-xgboost
101100
description: A heart condition classifier based on XGBoost
101+
type: model
102102
model: azureml:heart-classifier@latest
103103
compute: azureml:low-pri-cluster
104104
resources:
105105
instance_count: 2
106-
max_concurrency_per_instance: 2
107-
mini_batch_size: 2
108-
output_action: append_row
109-
output_file_name: predictions.csv
110-
retry_settings:
111-
max_retries: 3
112-
timeout: 300
113-
error_threshold: -1
114-
logging_level: info
106+
settings:
107+
max_concurrency_per_instance: 2
108+
mini_batch_size: 2
109+
output_action: append_row
110+
output_file_name: predictions.csv
111+
retry_settings:
112+
max_retries: 3
113+
timeout: 300
115114
```
116115
117116
Then, create the deployment with the following command:
@@ -125,19 +124,20 @@ Once you have the new compute created, you can create or update your deployment
125124
To create or update a deployment under the new compute cluster, use the following script:
126125

127126
```python
128-
deployment = BatchDeployment(
127+
deployment = ModelBatchDeployment(
129128
name="classifier-xgboost",
130129
description="A heart condition classifier based on XGBoost",
131130
endpoint_name=endpoint.name,
132131
model=model,
133132
compute=compute_name,
134-
instance_count=2,
135-
max_concurrency_per_instance=2,
136-
mini_batch_size=2,
137-
output_action=BatchDeploymentOutputAction.APPEND_ROW,
138-
output_file_name="predictions.csv",
139-
retry_settings=BatchRetrySettings(max_retries=3, timeout=300),
140-
logging_level="info",
133+
settings=ModelBatchDeploymentSettings(
134+
instance_count=2,
135+
max_concurrency_per_instance=2,
136+
mini_batch_size=2,
137+
output_action=BatchDeploymentOutputAction.APPEND_ROW,
138+
output_file_name="predictions.csv",
139+
retry_settings=BatchRetrySettings(max_retries=3, timeout=300),
140+
)
141141
)
142142

143143
ml_client.batch_deployments.begin_create_or_update(deployment)

0 commit comments

Comments
 (0)