Azure / MachineLearningNotebooks

Python notebooks with ML and deep learning examples with Azure Machine Learning Python SDK | Microsoft
https://docs.microsoft.com/azure/machine-learning/service/
MIT License
4k stars 2.49k forks source link

How to get path on datastore from input dataset instead of pathOnCompute(mount path) #1965

Open jfan0214 opened 1 week ago

jfan0214 commented 1 week ago

I would like to get the datastore path e.g. datastores/storepath/paths/shares/... instead of pathOnCompute from my inputDataSet. What API should I use? I tried the following but none of them work:

paths = input_dataset.to_path() //the to_path() only get the file name list, it doesn't contain the path

get_details() only contains pathOnCompute as well

Thanks for your input

ali713111 commented 1 week ago

you can use as_download or as_mount path = input_dataset.to_path(workspace, name='your_dataset_name_xyz') path = input_dataset.as_mount() mount_context.start()

Get the datastore path

datastore_path = input_dataset.datastore.path('your_dataset_name').as_mount()