Adding support for reading only chunks and various pieces of the H5Py lower level interface#5
Merged
bnlawrence merged 29 commits intomasterfrom Jul 9, 2024
Merged
Adding support for reading only chunks and various pieces of the H5Py lower level interface#5bnlawrence merged 29 commits intomasterfrom
bnlawrence merged 29 commits intomasterfrom
Conversation
…ven't got any tests around this yet.
…changes to actually using the filter pipeline. At this point is failling test_reference.
…lso remove list definition which breaks references.
… a pseudo chunked read. Lots of things to do around optimising that read, but let's test this more widely first.
valeriupredoi
requested changes
Jun 6, 2024
Collaborator
valeriupredoi
left a comment
There was a problem hiding this comment.
first set of review comments @bnlawrence - mostly very minor stuff 😁 )review stopped at h5d.py)
valeriupredoi
approved these changes
Jun 6, 2024
Collaborator
valeriupredoi
left a comment
There was a problem hiding this comment.
Done with the review @bnlawrence - really awesome stuff here! I think we should approach this in a structured manner:
- get this PR in your main fork's
master(after you've done whatever changes you think need be done from my review - I can also help with a re-review at the very end) - crack open a PR from your fork to the main Pyfive repo - provided that all tests pass, and we write a very descriptive PR note (that can also go in their docs - which they don't really have, but that would be a good start)
- offer me and/or you and/or @davidhassell as maintainers of their package - on conda-feedstock (so we get our men in the loop)
- offer you as Pyfive core dev (or whatever they call it, main developer etc)
- note that they may complain about the Zarr module we lift and shift - we ought to think about that
Cheers and have fun Swifting 🤣
| from .indexing import OrthogonalIndexer, ZarrArrayStub | ||
| from .btree import BTreeV1RawDataChunks | ||
|
|
||
| StoreInfo = namedtuple('StoreInfo',"chunk_offset filter_mask byte_offset size") |
Collaborator
There was a problem hiding this comment.
Suggested change
| StoreInfo = namedtuple('StoreInfo',"chunk_offset filter_mask byte_offset size") | |
| StoreInfo = namedtuple('StoreInfo', "chunk_offset filter_mask byte_offset size") |
| if self.filter_pipeline is not None: | ||
| chunk_buffer = BTreeV1RawDataChunks._filter_chunk(chunk_buffer, filter_mask, self.filter_pipeline, self.dtype.itemsize) | ||
| chunk_data = np.frombuffer(chunk_buffer, dtype=self.dtype) | ||
| out[out_selection] = chunk_data.reshape(self._chunks, order=self._order)[chunk_selection] |
Collaborator
There was a problem hiding this comment.
this was giving us plenty of headaches in PyActive - I'd definitely encase it in a few try/excepts with plenty of descriptive exceptions
Collaborator
Author
There was a problem hiding this comment.
I think this should be much safer in here. I'd like it to die very publicly if it does.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The key changes are the introduction of a subclass of DataObjects which represents a singleton variable DataObject, and a new H5D class which provides the lower level chunk interface. Arguably these two classes could be combined.