Skip to content

Commit 9c5af7d

Browse files
authored
Update how-to-read-write-data-v2.md
Updated code for MLClient.from_config.
1 parent 5f993d6 commit 9c5af7d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -987,14 +987,14 @@ from azure.ai.ml import Input
987987
from azure.ai.ml.constants import AssetTypes, InputOutputModes
988988
from azure.ai.ml import MLClient
989989
990-
ml_client = MLClient.from_config()
990+
ml_client = MLClient.from_config(credential=DefaultAzureCredential())
991991
992992
filedataset_asset = ml_client.data.get(name="<filedataset_name>", version="<version>")
993993
994994
my_job_inputs = {
995995
"input_data": Input(
996996
type=AssetTypes.MLTABLE,
997-
path=filedataset_asset,
997+
path=filedataset_asset.id,
998998
mode=InputOutputModes.EVAL_MOUNT
999999
)
10001000
}
@@ -1059,14 +1059,14 @@ from azure.ai.ml import Input
10591059
from azure.ai.ml.constants import AssetTypes, InputOutputModes
10601060
from azure.ai.ml import MLClient
10611061
1062-
ml_client = MLClient.from_config()
1062+
ml_client = MLClient.from_config(credential=DefaultAzureCredential())
10631063
10641064
filedataset_asset = ml_client.data.get(name="<tabulardataset_name>", version="<version>")
10651065
10661066
my_job_inputs = {
10671067
"input_data": Input(
10681068
type=AssetTypes.MLTABLE,
1069-
path=filedataset_asset,
1069+
path=filedataset_asset.id,
10701070
mode=InputOutputModes.DIRECT
10711071
)
10721072
}
@@ -1119,4 +1119,4 @@ az ml job create -f <file-name>.yml
11191119

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

0 commit comments

Comments
 (0)