Skip to content

HDF5 support #7690

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

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

HDF5 support #7690

wants to merge 16 commits into from

Conversation

klamike
Copy link

@klamike klamike commented Jul 18, 2025

This PR adds support for tabular HDF5 file(s) by converting each row to an Arrow table. It supports columns with the usual dtypes including up to 5-dimensional arrays as well as support for complex/compound types by using Features(dict). All datasets within the HDF5 file should have rows on the first dimension (groups/subgroups are still allowed). Closes #3113.

Replaces #7625 which only supports a relatively small subset of HDF5.

@klamike klamike marked this pull request as ready for review July 19, 2025 03:52
@klamike
Copy link
Author

klamike commented Jul 23, 2025

A few to-dos which I think can be left for future PRs (which I am happy to do/help with -- just this one is already huge 😄 ):

@klamike
Copy link
Author

klamike commented Jul 25, 2025

@lhoestq any interest in merging this? Let me know if I can do anything to make reviewing it easier!

@lhoestq
Copy link
Member

lhoestq commented Aug 11, 2025

Sorry for the delay, I'll review your PR soon :)

@HuggingFaceDocBuilderDev

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.

Copy link
Member

@lhoestq lhoestq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great ! I left a few comments :)

Btw feel free to run make style to fix code formatting

@klamike
Copy link
Author

klamike commented Aug 11, 2025

Thanks for the review @lhoestq! Rebased on main and incorporated most of your suggestions.

I believe the only one left is the zero-dim handling with table_cast...

@klamike
Copy link
Author

klamike commented Aug 12, 2025

@lhoestq is 2c4bfba what you meant?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Loading Data from HDF files
3 participants