-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Refactor HDF5 and preserve tree structure #7743
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
Conversation
should_chunk, keys, values = False, [], [] | ||
for k, v in batch_dict.items(): | ||
if isinstance(v, pa.ChunkedArray): | ||
should_chunk = True | ||
v = v.combine_chunks() | ||
keys.append(k) | ||
values.append(v) | ||
|
||
sarr = pa.StructArray.from_arrays(values, names=keys) | ||
return pa.chunked_array(sarr) if should_chunk else sarr |
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.
Had to add this when trying a large dataset.. this is because all groups are represented by StructArray now, which needs non-chunked arrays when constructing
@lhoestq this is ready for you now! |
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
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.
LGTM ! 🙌
Closes #7741. Followup to #7690
combine_chunks
on any large non-root datasets.complex64
(twofloat32
s, used to be converted to twofloat64
s)load_dataset
instead of internal APIscolumns
in config. Have to give Features (i.e., must specify types) if filtering