Skip to content

Commit 044f935

Browse files
authored
Replace upload() method
Addresses git issue https://github.com/MicrosoftDocs/azure-docs/issues/89651
1 parent a1d6535 commit 044f935

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

articles/machine-learning/tutorial-1st-experiment-bring-data.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,13 @@ To run this script in Azure Machine Learning, you need to make your training dat
169169
```python
170170
# upload-data.py
171171
from azureml.core import Workspace
172+
from azureml.core import Dataset
173+
from azureml.data.datapath import DataPath
174+
172175
ws = Workspace.from_config()
173176
datastore = ws.get_default_datastore()
174-
datastore.upload(src_dir='./data',
175-
target_path='datasets/cifar10',
176-
overwrite=True)
177+
Dataset.File.upload_directory(src_dir='data',
178+
target=DataPath(datastore, "datasets/cifar10")
177179

178180
```
179181

0 commit comments

Comments
 (0)