-
Notifications
You must be signed in to change notification settings - Fork 38
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
Fancy indexing is not supported #47
Comments
Hi @jreadey, we're interested in using fancy indexing with HSDS datasets as well. Initially, we tried using the equivalent point selection as suggested in #48 as a workaround, but are finding that the performance is poor relative to a hyperslab selection on a superset of the point selection once you get past the scale of 10k points. Just curious to see if there's any update on what it would take to implement fancy indexing at this point. I was looking through the RESTful HDF5 white paper and noticed that there is a section under the Dataset POST spec that mentions "set-theoretical combinations of hyperslabs" but a detailed example request is not given. It's also not mentioned in the h5serv documentation so I'm wondering if it made it into the final version of the spec. |
Yes, I've been meaning to get to this... You are looking to handle this type of idexing:
correct? Also, I see that h5py recently added support for Multi-Block selection: https://docs.h5py.org/en/stable/high/dataset.html#multi-block-selection. Is that of interest as well/ |
That's right. We don't have a specific need for multi-block selection at the moment, just fancy indexing as you've described. To clarify, is it be possible to make a fancy indexing request (albeit less efficiently) via the dataset value GET API currently? Wondering if we could test this out with a modification of the h5pyd client or if an HSDS update would be required. |
Yes, you can just do multiple regular selections.
It's unfortunate that h5pyd doesn't support asynchronous requests which would let you do all the fetches without waiting for responses, but this should work till we have the fancy selection going. |
I believe I have this feature working now. Code changes are in the fancyindx branch of hsds and fancyindx branch of h5pyd. |
The feature is merged into master now and in PyPI (version 0.9.2). Here's a simple performance test comparing using fancy indexing vs iterating through a set of columns: https://gist.github.com/jreadey/bd75c469559f03596bd2d274dfb5a315. In my testing using fancy indexing was ~8x faster (running with 4 HSDS nodes). |
@jreadey , I think you were aware of it since you mentioned Coordinate list (
dset[(x,y,z),:]
) not being supported yet (not sure if you actually meantlist
). But I considered it as the one of most used selection type that is worth the efforts to be added.The text was updated successfully, but these errors were encountered: