Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jfan0214 opened this issue Jun 22, 2024 · 1 comment

Comments

@jfan0214
Copy link

jfan0214 commented Jun 22, 2024

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

@jfan0214 jfan0214 changed the title How to get datastore path from input dataset instead of pathOnCompute(mount path) How to get path on datastore from input dataset instead of pathOnCompute(mount path) Jun 22, 2024
@ali713111
Copy link

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()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants