Skip to content

Commit 39b8699

Browse files
authored
Merge pull request #219868 from santiagxf/santiagxf/azureml-batch-limitations
Update how-to-troubleshoot-batch-endpoints.md
2 parents b9fe081 + ad7975c commit 39b8699

File tree

2 files changed

+112
-74
lines changed

2 files changed

+112
-74
lines changed

articles/machine-learning/how-to-access-data-batch-endpoints-jobs.md

Lines changed: 80 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,20 @@ Data from Azure Machine Learning registered data stores can be directly referenc
9797
9898
# [REST](#tab/rest)
9999
100-
Use the Azure ML CLI, Azure ML SDK for Python, or Studio to get the subscription ID, resource group, workspace, and name of the data store. You will need them later.
101-
100+
__Body__
101+
102+
```json
103+
{
104+
"properties": {
105+
"InputData": {
106+
"mnistinput": {
107+
"JobInputType" : "UriFolder",
108+
"Uri": "azureml:/subscriptions/<subscription>/resourceGroups/<resource-group/providers/Microsoft.MachineLearningServices/workspaces/<workspace>/datastores/<data-store>/paths/<data-path>"
109+
}
110+
}
111+
}
112+
}
113+
```
102114
---
103115
104116
> [!NOTE]
@@ -134,21 +146,6 @@ Data from Azure Machine Learning registered data stores can be directly referenc
134146
Authorization: Bearer <TOKEN>
135147
Content-Type: application/json
136148
```
137-
138-
__Body__
139-
140-
```json
141-
{
142-
"properties": {
143-
"InputData": {
144-
"mnistinput": {
145-
"JobInputType" : "UriFolder",
146-
"Uri": "azureml:/subscriptions/<subscription>/resourceGroups/<resource-group/providers/Microsoft.MachineLearningServices/workspaces/<workspace>/datastores/<data-store>/paths/<data-path>"
147-
}
148-
}
149-
}
150-
}
151-
```
152149
153150
## Reading data from a data asset
154151
@@ -225,8 +222,20 @@ Azure Machine Learning data assets (formerly known as datasets) are supported as
225222
226223
# [REST](#tab/rest)
227224
228-
This step isn't required.
225+
__Body__
229226
227+
```json
228+
{
229+
"properties": {
230+
"InputData": {
231+
"mnistinput": {
232+
"JobInputType" : "UriFolder",
233+
"Uri": "azureml://locations/<location>/workspaces/<workspace>/data/<dataset_name>/versions/labels/latest"
234+
}
235+
}
236+
}
237+
}
238+
```
230239
---
231240
232241
> [!NOTE]
@@ -263,21 +272,6 @@ Azure Machine Learning data assets (formerly known as datasets) are supported as
263272
Authorization: Bearer <TOKEN>
264273
Content-Type: application/json
265274
```
266-
267-
__Body__
268-
269-
```json
270-
{
271-
"properties": {
272-
"InputData": {
273-
"mnistinput": {
274-
"JobInputType" : "UriFolder",
275-
"Uri": "azureml://locations/<location>/workspaces/<workspace>/data/<dataset_name>/versions/labels/latest"
276-
}
277-
}
278-
}
279-
}
280-
```
281275
282276
## Reading data from Azure Storage Accounts
283277
@@ -290,59 +284,36 @@ Azure Machine Learning batch endpoints can read data from cloud locations in Azu
290284
291285
# [Azure CLI](#tab/cli)
292286
293-
This step isn't required.
294-
295-
# [Python](#tab/sdk)
296-
297-
```python
298-
input = Input(type=AssetTypes.URI_FOLDER, path="https://azuremlexampledata.blob.core.windows.net/data/heart-disease-uci/data")
287+
```azurecli
288+
INPUT_DATA = "https://azuremlexampledata.blob.core.windows.net/data/heart-disease-uci/data"
299289
```
300290
301-
If your data is a file, change `type=AssetTypes.URI_FILE`:
291+
If your data is a file:
302292
303-
```python
304-
input = Input(type=AssetTypes.URI_FILE, path="https://azuremlexampledata.blob.core.windows.net/data/heart-disease-uci/data/heart.csv")
293+
```azurecli
294+
INPUT_DATA = "https://azuremlexampledata.blob.core.windows.net/data/heart-disease-uci/data/heart.csv"
305295
```
306296
307-
# [REST](#tab/rest)
308-
309-
This step isn't required.
310-
311-
312-
1. Run the deployment:
297+
# [Python](#tab/sdk)
313298
314-
# [Azure CLI](#tab/cli)
315-
316-
```bash
317-
INVOKE_RESPONSE = $(az ml batch-endpoint invoke --name $ENDPOINT_NAME --input-type uri_folder --input https://azuremlexampledata.blob.core.windows.net/data/heart-disease-uci/data)
299+
```python
300+
input = Input(
301+
type=AssetTypes.URI_FOLDER,
302+
path="https://azuremlexampledata.blob.core.windows.net/data/heart-disease-uci/data"
303+
)
318304
```
319305
320-
If your data is a file, change `--input-type uri_file`:
321-
322-
```bash
323-
INVOKE_RESPONSE = $(az ml batch-endpoint invoke --name $ENDPOINT_NAME --input-type uri_file --input https://azuremlexampledata.blob.core.windows.net/data/heart-disease-uci/data/heart.csv)
324-
```
306+
If your data is a file, change `type=AssetTypes.URI_FILE`:
325307
326-
# [Python](#tab/sdk)
327-
328308
```python
329-
job = ml_client.batch_endpoints.invoke(
330-
endpoint_name=endpoint.name,
331-
input=input,
309+
input = Input(
310+
type=AssetTypes.URI_FILE,
311+
path="https://azuremlexampledata.blob.core.windows.net/data/heart-disease-uci/data/heart.csv"
332312
)
333313
```
334314
335-
# [REST](#tab/rest)
315+
# [REST](#tab/rest)
336316
337-
__Request__
338-
339-
```http
340-
POST jobs HTTP/1.1
341-
Host: <ENDPOINT_URI>
342-
Authorization: Bearer <TOKEN>
343-
Content-Type: application/json
344-
```
345-
346317
__Body__
347318
348319
```json
@@ -374,7 +345,43 @@ Azure Machine Learning batch endpoints can read data from cloud locations in Azu
374345
}
375346
}
376347
```
377-
---
348+
349+
1. Run the deployment:
350+
351+
# [Azure CLI](#tab/cli)
352+
353+
If your data is a folder, use `--input-type uri_folder`:
354+
355+
```bash
356+
INVOKE_RESPONSE = $(az ml batch-endpoint invoke --name $ENDPOINT_NAME --input-type uri_folder --input $INPUT_DATA)
357+
```
358+
359+
If your data is a file, use `--input-type uri_file`:
360+
361+
```bash
362+
INVOKE_RESPONSE = $(az ml batch-endpoint invoke --name $ENDPOINT_NAME --input-type uri_file --input $INPUT_DATA)
363+
```
364+
365+
# [Python](#tab/sdk)
366+
367+
```python
368+
job = ml_client.batch_endpoints.invoke(
369+
endpoint_name=endpoint.name,
370+
input=input,
371+
)
372+
```
373+
374+
# [REST](#tab/rest)
375+
376+
__Request__
377+
378+
```http
379+
POST jobs HTTP/1.1
380+
Host: <ENDPOINT_URI>
381+
Authorization: Bearer <TOKEN>
382+
Content-Type: application/json
383+
```
384+
378385

379386
## Security considerations when reading data
380387

articles/machine-learning/how-to-troubleshoot-batch-endpoints.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@ ms.custom: devplatv2
1717

1818
[!INCLUDE [dev v2](../../includes/machine-learning-dev-v2.md)]
1919

20-
Learn how to troubleshoot and solve, or work around, common errors you may come across when using [batch endpoints](how-to-use-batch-endpoint.md) for batch scoring.
20+
Learn how to troubleshoot and solve, or work around, common errors you may come across when using [batch endpoints](how-to-use-batch-endpoint.md) for batch scoring. In this article you will learn:
21+
22+
> [!div class="checklist"]
23+
> * How [logs of a batch scoring job are organized](#understanding-logs-of-a-batch-scoring-job).
24+
> * How to [solve common errors](#common-issues).
25+
> * Identify [not supported scenarios in batch endpoints](#limitations-and-not-supported-scenarios) and their limitations.
2126
2227
## Understanding logs of a batch scoring job
2328

@@ -179,3 +184,29 @@ __Context__: When invoking a batch endpoint using its REST APIs.
179184
__Reason__: The access token used to invoke the REST API for the endpoint/deployment is indicating a token that is issued for a different audience/service. Azure Active Directory tokens are issued for specific actions.
180185

181186
__Solution__: When generating an authentication token to be used with the Batch Endpoint REST API, ensure the `resource` parameter is set to `https://ml.azure.com`. Please notice that this resource is different from the resource you need to indicate to manage the endpoint using the REST API. All Azure resources (including batch endpoints) use the resource `https://management.azure.com` for managing them. Ensure you use the right resource URI on each case. Notice that if you want to use the management API and the job invocation API at the same time, you will need two tokens. For details see: [Authentication on batch endpoints (REST)](how-to-authenticate-batch-endpoint.md?tabs=rest).
187+
188+
## Limitations and not supported scenarios
189+
190+
When designing machine learning solutions that rely on batch endpoints, some configurations and scenarios may not be supported.
191+
192+
The following __workspace__ configurations are __not supported__:
193+
194+
* Workspaces configured with an Azure Container Registries with Quarantine feature enabled.
195+
* Workspaces with customer-managed keys (CMK).
196+
197+
The following __compute__ configurations are __not supported__:
198+
199+
* Azure ARC Kubernetes clusters.
200+
* Granular resource request (memory, vCPU, GPU) for Azure Kubernetes clusters. Only instance count can be requested.
201+
202+
The following __input types__ are __not supported__:
203+
204+
* Tabular datasets (V1).
205+
* Folders and File datasets (V1).
206+
* MLtable (V2).
207+
208+
## Next steps
209+
210+
* [Author scoring scripts for batch deployments](how-to-batch-scoring-script.md).
211+
* [Authentication on batch endpoints](how-to-authenticate-batch-endpoint.md).
212+
* [Network isolation in batch endpoints](how-to-secure-batch-endpoint.md).

0 commit comments

Comments
 (0)