-
Notifications
You must be signed in to change notification settings - Fork 153
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
Chunked writing of h5py.Dataset and zarr.Array #1624
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1624 +/- ##
==========================================
- Coverage 86.74% 83.99% -2.75%
==========================================
Files 37 40 +3
Lines 5988 6031 +43
==========================================
- Hits 5194 5066 -128
- Misses 794 965 +171
Flags with carried forward coverage won't be shown. Click here to find out more.
|
src/anndata/_io/specs/methods.py
Outdated
@@ -392,6 +389,46 @@ def write_basic( | |||
f.create_dataset(k, data=elem, **dataset_kwargs) | |||
|
|||
|
|||
def _iter_chunks_for_copy(elem, dest): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typing please!
src/anndata/_io/specs/methods.py
Outdated
def write_chunked_dense_array( | ||
f: GroupStorageType, | ||
k: str, | ||
elem, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
elem, | |
elem: GroupStorageType, |
no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ArrayStorageType
I think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
elem, | |
elem: ArrayStorageType, |
This PR fixes #1623 by writing backed dense arrays in chunks.
Very open to feedback on the logic of how chunking pattern of writes is selected. Maybe we should prioritize the chunking of the destination array over the chunking of the source array?
cc: @ebezzi
Some proof it works: