I did some testing with the fancy indexing. I ran into some issues when accessing random entries.
The test code from your script worked fine:
dset[:, [1,10,100],[10,100,100]]
But this access does not work for me:
dset[:, [1,10,100],[10,100,500]]
It takes a long time to finish and then I get a no data error.
Suprisingly the access works for me when the index is not too far from the diagonal:
dset[:, [1,10,100],[10,100,150]]
It also seems to work fine with larger requests, as long as they are diagonal:
indices = np.arange(10,800)
print(indices.shape)
print(dset.shape)
offset = 0
indices2 = np.arange(10+offset,800+offset)
dset[:, indices,indices2].shape
But setting offset = 1 will already cause it for me to fail.
There seems to be issues accessing non diagonal entries. It would be nice if you could verify it. I am running hsds on a minimal kubernetes cluster of one pod with one sn and one dn.
Edit: Added the logs to a failed request
REQ> GET: /datasets/d-0bf390da-4101df4d-fe38-e0b360-6cda57/value [pcrcontainer/fancy_select.h5]
INFO> getObjectJson d-0bf390da-4101df4d-fe38-e0b360-6cda57
INFO> validateAction(domain=pcrcontainer/fancy_select.h5, obj_id=d-0bf390da-4101df4d-fe38-e0b360-6cda57, username=admin, action=read)
INFO> getDomainJson(pcrcontainer/fancy_select.h5, reload=False)
INFO> aclCheck: read for user: admin
INFO> streaming response data for page: 1 of 1, selection: (slice(0, 5, 1), [1, 10, 100], [10, 100, 500])
INFO> doReadSelection - number of chunk_ids: 4
INFO> ChunkCrawler.__init__ 4 chunks, action=read_chunk_hyperslab
INFO> ChunkCrawler - client_pool count: 6
INFO> ChunkCrawler max_tasks 4 = await queue.join - count: 4
INFO> ChunkCrawler - work method for task: cc_task_0
INFO> ChunkCrawler - client_name: cc_task_0.2
INFO> read_chunk_hyperslab, chunk_id: c-0bf390da-4101df4d-fe38-e0b360-6cda57_0_0_1, bucket: pcrcontainer
WARN> shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (1,)
ERROR> HTTPBadRequest for read_chunk_hyperslab(c-0bf390da-4101df4d-fe38-e0b360-6cda57_0_0_1): shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (1,)
INFO> ChunkCrawler - work method for task: cc_task_1
INFO> ChunkCrawler - client_name: cc_task_1.3
INFO> read_chunk_hyperslab, chunk_id: c-0bf390da-4101df4d-fe38-e0b360-6cda57_1_0_1, bucket: pcrcontainer
WARN> shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (1,)
ERROR> HTTPBadRequest for read_chunk_hyperslab(c-0bf390da-4101df4d-fe38-e0b360-6cda57_1_0_1): shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (1,)
INFO> ChunkCrawler - work method for task: cc_task_2
INFO> ChunkCrawler - client_name: cc_task_2.2
INFO> read_chunk_hyperslab, chunk_id: c-0bf390da-4101df4d-fe38-e0b360-6cda57_0_0_0, bucket: pcrcontainer
WARN> shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (2,)
ERROR> HTTPBadRequest for read_chunk_hyperslab(c-0bf390da-4101df4d-fe38-e0b360-6cda57_0_0_0): shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (2,)
INFO> ChunkCrawler - work method for task: cc_task_3
INFO> ChunkCrawler - client_name: cc_task_3.2
INFO> read_chunk_hyperslab, chunk_id: c-0bf390da-4101df4d-fe38-e0b360-6cda57_1_0_0, bucket: pcrcontainer
WARN> shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (2,)
ERROR> HTTPBadRequest for read_chunk_hyperslab(c-0bf390da-4101df4d-fe38-e0b360-6cda57_1_0_0): shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (2,)
INFO> read_chunk_hyperslab, chunk_id: c-0bf390da-4101df4d-fe38-e0b360-6cda57_1_0_1, bucket: pcrcontainer
WARN> shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (1,)
ERROR> HTTPBadRequest for read_chunk_hyperslab(c-0bf390da-4101df4d-fe38-e0b360-6cda57_1_0_1): shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (1,)
INFO> read_chunk_hyperslab, chunk_id: c-0bf390da-4101df4d-fe38-e0b360-6cda57_0_0_1, bucket: pcrcontainer
WARN> shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (1,)
ERROR> HTTPBadRequest for read_chunk_hyperslab(c-0bf390da-4101df4d-fe38-e0b360-6cda57_0_0_1): shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (1,)
INFO> read_chunk_hyperslab, chunk_id: c-0bf390da-4101df4d-fe38-e0b360-6cda57_1_0_0, bucket: pcrcontainer
WARN> shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (2,)
ERROR> HTTPBadRequest for read_chunk_hyperslab(c-0bf390da-4101df4d-fe38-e0b360-6cda57_1_0_0): shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (2,)
INFO> read_chunk_hyperslab, chunk_id: c-0bf390da-4101df4d-fe38-e0b360-6cda57_0_0_0, bucket: pcrcontainer
WARN> shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (2,)
ERROR> HTTPBadRequest for read_chunk_hyperslab(c-0bf390da-4101df4d-fe38-e0b360-6cda57_0_0_0): shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (2,)
INFO> read_chunk_hyperslab, chunk_id: c-0bf390da-4101df4d-fe38-e0b360-6cda57_1_0_1, bucket: pcrcontainer
WARN> shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (1,)
ERROR> HTTPBadRequest for read_chunk_hyperslab(c-0bf390da-4101df4d-fe38-e0b360-6cda57_1_0_1): shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (1,)
INFO> read_chunk_hyperslab, chunk_id: c-0bf390da-4101df4d-fe38-e0b360-6cda57_1_0_0, bucket: pcrcontainer
WARN> shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (2,)
ERROR> HTTPBadRequest for read_chunk_hyperslab(c-0bf390da-4101df4d-fe38-e0b360-6cda57_1_0_0): shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (2,)
INFO> read_chunk_hyperslab, chunk_id: c-0bf390da-4101df4d-fe38-e0b360-6cda57_0_0_1, bucket: pcrcontainer
WARN> shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (1,)
ERROR> HTTPBadRequest for read_chunk_hyperslab(c-0bf390da-4101df4d-fe38-e0b360-6cda57_0_0_1): shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (1,)
INFO> read_chunk_hyperslab, chunk_id: c-0bf390da-4101df4d-fe38-e0b360-6cda57_0_0_0, bucket: pcrcontainer
WARN> shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (2,)
ERROR> HTTPBadRequest for read_chunk_hyperslab(c-0bf390da-4101df4d-fe38-e0b360-6cda57_0_0_0): shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (2,)
REQ> GET: /info
RSP> <200> (OK): /info
INFO> read_chunk_hyperslab, chunk_id: c-0bf390da-4101df4d-fe38-e0b360-6cda57_1_0_1, bucket: pcrcontainer
WARN> shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (1,)
ERROR> HTTPBadRequest for read_chunk_hyperslab(c-0bf390da-4101df4d-fe38-e0b360-6cda57_1_0_1): shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (1,)
INFO> read_chunk_hyperslab, chunk_id: c-0bf390da-4101df4d-fe38-e0b360-6cda57_1_0_0, bucket: pcrcontainer
WARN> shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (2,)
ERROR> HTTPBadRequest for read_chunk_hyperslab(c-0bf390da-4101df4d-fe38-e0b360-6cda57_1_0_0): shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (2,)
INFO> read_chunk_hyperslab, chunk_id: c-0bf390da-4101df4d-fe38-e0b360-6cda57_0_0_0, bucket: pcrcontainer
WARN> shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (2,)
ERROR> HTTPBadRequest for read_chunk_hyperslab(c-0bf390da-4101df4d-fe38-e0b360-6cda57_0_0_0): shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (2,)
INFO> read_chunk_hyperslab, chunk_id: c-0bf390da-4101df4d-fe38-e0b360-6cda57_0_0_1, bucket: pcrcontainer
WARN> shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (1,)
ERROR> HTTPBadRequest for read_chunk_hyperslab(c-0bf390da-4101df4d-fe38-e0b360-6cda57_0_0_1): shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (1,)
INFO> read_chunk_hyperslab, chunk_id: c-0bf390da-4101df4d-fe38-e0b360-6cda57_1_0_1, bucket: pcrcontainer
WARN> shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (1,)
ERROR> HTTPBadRequest for read_chunk_hyperslab(c-0bf390da-4101df4d-fe38-e0b360-6cda57_1_0_1): shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (1,)
INFO> read_chunk_hyperslab, chunk_id: c-0bf390da-4101df4d-fe38-e0b360-6cda57_1_0_0, bucket: pcrcontainer
WARN> shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (2,)
ERROR> HTTPBadRequest for read_chunk_hyperslab(c-0bf390da-4101df4d-fe38-e0b360-6cda57_1_0_0): shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (2,)
INFO> read_chunk_hyperslab, chunk_id: c-0bf390da-4101df4d-fe38-e0b360-6cda57_0_0_0, bucket: pcrcontainer
WARN> shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (2,)
ERROR> HTTPBadRequest for read_chunk_hyperslab(c-0bf390da-4101df4d-fe38-e0b360-6cda57_0_0_0): shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (2,)
INFO> read_chunk_hyperslab, chunk_id: c-0bf390da-4101df4d-fe38-e0b360-6cda57_0_0_1, bucket: pcrcontainer
WARN> shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (1,)
ERROR> HTTPBadRequest for read_chunk_hyperslab(c-0bf390da-4101df4d-fe38-e0b360-6cda57_0_0_1): shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (1,)
INFO> read_chunk_hyperslab, chunk_id: c-0bf390da-4101df4d-fe38-e0b360-6cda57_1_0_1, bucket: pcrcontainer
WARN> shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (1,)
ERROR> HTTPBadRequest for read_chunk_hyperslab(c-0bf390da-4101df4d-fe38-e0b360-6cda57_1_0_1): shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (1,)
INFO> read_chunk_hyperslab, chunk_id: c-0bf390da-4101df4d-fe38-e0b360-6cda57_0_0_1, bucket: pcrcontainer
WARN> shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (1,)
ERROR> HTTPBadRequest for read_chunk_hyperslab(c-0bf390da-4101df4d-fe38-e0b360-6cda57_0_0_1): shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (1,)
INFO> read_chunk_hyperslab, chunk_id: c-0bf390da-4101df4d-fe38-e0b360-6cda57_1_0_0, bucket: pcrcontainer
WARN> shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (2,)
ERROR> HTTPBadRequest for read_chunk_hyperslab(c-0bf390da-4101df4d-fe38-e0b360-6cda57_1_0_0): shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (2,)
INFO> read_chunk_hyperslab, chunk_id: c-0bf390da-4101df4d-fe38-e0b360-6cda57_0_0_0, bucket: pcrcontainer
WARN> shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (2,)
ERROR> HTTPBadRequest for read_chunk_hyperslab(c-0bf390da-4101df4d-fe38-e0b360-6cda57_0_0_0): shape mismatch: indexing arrays could not be broadcast together with shapes (3,) (2,)