Skip to content

Commit 0521915

Browse files
authored
Update how-to-access-data-batch-endpoints-jobs.md
1 parent 649b00b commit 0521915

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

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

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,11 @@ Data from Azure Machine Learning registered data stores can be directly referenc
5454
# [Azure ML CLI](#tab/cli)
5555

5656
```azurecli
57-
az ml workspace show --query storage_account
57+
DATASTORE_ID=$(az ml datastore show -n workspaceblobstore | jq -r '.id')
5858
```
59+
60+
> [!NOTE]
61+
> Data stores ID would look like `azureml:/subscriptions/<subscription>/resourceGroups/<resource-group>/providers/Microsoft.MachineLearningServices/workspaces/<workspace>/datastores/<data-store>`.
5962
6063
# [Azure ML SDK for Python](#tab/sdk)
6164
@@ -66,21 +69,25 @@ Data from Azure Machine Learning registered data stores can be directly referenc
6669
# [REST](#tab/rest)
6770
6871
Use the Azure ML CLI, Azure ML SDK for Python, or Studio to get the data store information.
72+
73+
---
74+
75+
> [!TIP]
76+
> The default blob data store in a workspace is called __workspaceblobstore__. You can skip this step if you already know the resource ID of the default data store in your workspace.
6977
70-
1. We'll need to upload some sample data to it. This example assumes you've uploaded the sample data included in the repo in the folder `sdk/python/endpoints/batch/heart-classifier/data` in the folder `heart-classifier/data` in the blob storage account.
78+
1. We'll need to upload some sample data to it. This example assumes you've uploaded the sample data included in the repo in the folder `sdk/python/endpoints/batch/heart-classifier/data` in the folder `heart-classifier/data` in the blob storage account. Ensure you have done that before moving forward.
7179
7280
1. Create a data input:
7381
7482
# [Azure ML CLI](#tab/cli)
83+
84+
Let's place the file path in the following variable:
7585
7686
```azurecli
7787
DATA_PATH="heart-disease-uci-unlabeled"
78-
DATASTORE_ID=$(az ml workspace show | jq -r '.storage_account')
88+
INPUT_PATH="$DATASTORE_ID/paths/$DATA_PATH"
7989
```
8090
81-
> [!TIP]
82-
> You can skip this step if you already know the name of the data store you want to use. Here it is used only to know the name of the default data store of the workspace.
83-
8491
# [Azure ML SDK for Python](#tab/sdk)
8592
8693
```python
@@ -90,23 +97,23 @@ Data from Azure Machine Learning registered data stores can be directly referenc
9097
9198
# [REST](#tab/rest)
9299
93-
Use the Azure ML CLI, Azure ML SDK for Python, or Studio to get the data store information.
100+
Build your input path using the structure "azureml://subscriptions/<subscription>/resourcegroups/<resource-group>/providers/microsoft.storage/storageaccounts/<storage-account-name>/paths/<data_path>".
101+
94102
---
95-
103+
96104
> [!NOTE]
97-
> Data stores ID would look like `/subscriptions/<subscription>/resourcegroups/<resource-group>/providers/microsoft.storage/storageaccounts/<storage-account-name>`.
105+
> See how the path `paths` is appended to the resource id of the data store to indicate that what follows is a path inside of it.
98106
107+
> [!TIP]
108+
> You can also use `azureml:/datastores/<data_store_name>/paths/<data_path>` as a way to indicate the input.
99109
100110
1. Run the deployment:
101111
102112
# [Azure ML CLI](#tab/cli)
103113
104114
```bash
105-
INVOKE_RESPONSE = $(az ml batch-endpoint invoke --name $ENDPOINT_NAME --input $DATASTORE_ID/paths/$DATA_PATH)
115+
INVOKE_RESPONSE = $(az ml batch-endpoint invoke --name $ENDPOINT_NAME --input $INPUT_PATH)
106116
```
107-
108-
> [!TIP]
109-
> You can also use `--input azureml:/datastores/<data_store_name>/paths/<data_path>` as a way to indicate the input.
110117
111118
# [Azure ML SDK for Python](#tab/sdk)
112119
@@ -203,7 +210,7 @@ Azure Machine Learning data assets (formaly known as datasets) are supported as
203210
---
204211
205212
> [!NOTE]
206-
> Data stores ID would look like `/subscriptions/<subscription>/resourcegroups/<resource-group>/providers/microsoft.storage/storageaccounts/<storage-account-name>`.
213+
> Data assets ID would look like `/subscriptions/<subscription>/resourcegroups/<resource-group>/providers/Microsoft.MachineLearningServices/workspaces/<workspace>/data/<data-asset>/versions/<version>`.
207214
208215
209216
1. Run the deployment:

0 commit comments

Comments
 (0)