Skip to content

Commit 930333d

Browse files
Merge pull request #276903 from SturgeonMi/patch-33
Update how-to-read-write-data-v2.md
2 parents cafc8f0 + 7643e97 commit 930333d

File tree

1 file changed

+27
-17
lines changed

1 file changed

+27
-17
lines changed

articles/machine-learning/how-to-read-write-data-v2.md

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,20 @@ ml_client = MLClient(
7878
)
7979

8080
# ==============================================================
81-
# Set the URI path for the data. Supported paths include:
81+
# Set the URI path for the data.
82+
# Supported `path` formats for input include:
8283
# local: `./<path>
8384
# Blob: wasbs://<container_name>@<account_name>.blob.core.windows.net/<path>
8485
# ADLS: abfss://<file_system>@<account_name>.dfs.core.windows.net/<path>
8586
# Datastore: azureml://datastores/<data_store_name>/paths/<path>
8687
# Data Asset: azureml:<my_data>:<version>
87-
# We set the path to a file on a public blob container
88+
# Supported `path` format for output is:
89+
# Datastore: azureml://datastores/<data_store_name>/paths/<path>
90+
# We set the input path to a file on a public blob container
8891
# ==============================================================
8992
path = "wasbs://[email protected]/titanic.csv"
9093

94+
9195
# ==============================================================
9296
# What type of data does the path point to? Options include:
9397
# data_type = AssetTypes.URI_FILE # a specific file
@@ -139,12 +143,15 @@ Create a job specification YAML file (`<file-name>.yml`).
139143
$schema: https://azuremlschemas.azureedge.net/latest/commandJob.schema.json
140144

141145
# ==============================================================
142-
# Set the URI path for the data. Supported paths include:
146+
# Set the URI path for the data.
147+
# Supported `path` formats for input include:
143148
# local: `./<path>
144149
# Blob: wasbs://<container_name>@<account_name>.blob.core.windows.net/<path>
145150
# ADLS: abfss://<file_system>@<account_name>.dfs.core.windows.net/<path>
146151
# Datastore: azureml://datastores/<data_store_name>/paths/<path>
147152
# Data Asset: azureml:<my_data>:<version>
153+
# Supported `path` format for output is:
154+
# Datastore: azureml://datastores/<data_store_name>/paths/<path>
148155
# ==============================================================
149156

150157
# ==============================================================
@@ -212,12 +219,15 @@ ml_client = MLClient(
212219
)
213220

214221
# ==============================================================
215-
# Set the input and output URI paths for the data. Supported paths include:
222+
# Set the URI path for the data.
223+
# Supported `path` formats for input include:
216224
# local: `./<path>
217225
# Blob: wasbs://<container_name>@<account_name>.blob.core.windows.net/<path>
218226
# ADLS: abfss://<file_system>@<account_name>.dfs.core.windows.net/<path>
219227
# Datastore: azureml://datastores/<data_store_name>/paths/<path>
220228
# Data Asset: azureml:<my_data>:<version>
229+
# Supported `path` format for output is:
230+
# Datastore: azureml://datastores/<data_store_name>/paths/<path>
221231
# As an example, we set the input path to a file on a public blob container
222232
# As an example, we set the output path to a folder in the default datastore
223233
# ==============================================================
@@ -259,8 +269,8 @@ outputs = {
259269
path=output_path,
260270
mode=output_mode,
261271
# optional: if you want to create a data asset from the output,
262-
# then uncomment name (name can be set without setting version)
263-
# name = "<name_of_data_asset>",
272+
# then uncomment `name` (`name` can be set without setting `version`, and in this way, we will set `version` automatically for you)
273+
# name = "<name_of_data_asset>", # use `name` and `version` to create a data asset from the output
264274
# version = "<version>",
265275
)
266276
}
@@ -319,10 +329,10 @@ outputs:
319329
path: azureml://datastores/workspaceblobstore/paths/quickstart-output/titanic.csv
320330
type: uri_file
321331
# optional: if you want to create a data asset from the output,
322-
# then uncomment name (name can be set without setting version)
323-
# name: <name_of_data_asset>
332+
# then uncomment `name` (`name` can be set without setting `version`, and in this way, we will set `version` automatically for you)
333+
# name: <name_of_data_asset> # use `name` and `version` to create a data asset from the output
324334
# version: <version>
325-
335+
326336
```
327337

328338
Next, submit the job using the CLI:
@@ -352,13 +362,13 @@ When you submit a job, the Azure Machine Learning data runtime controls the data
352362

353363
When you provide a data input/output to a job, you must specify a `path` parameter that points to the data location. This table shows the different data locations that Azure Machine Learning supports, and also shows `path` parameter examples:
354364

355-
|Location | Examples |
356-
|---------|---------|
357-
|A path on your local computer | `./home/username/data/my_data` |
358-
|A path on a public http(s) server | `https://raw.githubusercontent.com/pandas-dev/pandas/main/doc/data/titanic.csv` |
359-
|A path on Azure Storage | `wasbs://<container_name>@<account_name>.blob.core.windows.net/<path>`<br>`abfss://<file_system>@<account_name>.dfs.core.windows.net/<path>` |
360-
|A path on an Azure Machine Learning Datastore | `azureml://datastores/<data_store_name>/paths/<path>` |
361-
|A path to a Data Asset | `azureml:<my_data>:<version>` |
365+
|Location | Examples | Input | Output |
366+
|---------|---------|---------|---------|
367+
|A path on your local computer | `./home/username/data/my_data` |Y|N|
368+
|A path on a public http(s) server | `https://raw.githubusercontent.com/pandas-dev/pandas/main/doc/data/titanic.csv` |Y|N|
369+
|A path on Azure Storage | `wasbs://<container_name>@<account_name>.blob.core.windows.net/<path>`<br>`abfss://<file_system>@<account_name>.dfs.core.windows.net/<path>` |Y, only for identity-based authentication.|N|
370+
|A path on an Azure Machine Learning Datastore | `azureml://datastores/<data_store_name>/paths/<path>` |Y|Y|
371+
|A path to a Data Asset | `azureml:<my_data>:<version>` |Y|N, but you can use `name` and `version` to create a data asset from output|
362372

363373
## Modes
364374

@@ -1127,4 +1137,4 @@ az ml job create -f <file-name>.yml
11271137

11281138
* [Train models](how-to-train-model.md)
11291139
* [Tutorial: Create production ML pipelines with Python SDK v2](tutorial-pipeline-python-sdk.md)
1130-
* Learn more about [Data in Azure Machine Learning](concept-data.md)
1140+
* Learn more about [Data in Azure Machine Learning](concept-data.md)

0 commit comments

Comments
 (0)