# How to use dataset in h5 format?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-use-dataset-in-h5-format%2F35625%3E%5C
**Category:** 🤗Hub\
**Created:** [April 5, 2023, 8:22am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-use-dataset-in-h5-format%2F35625 "2023-04-05T08:22:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![emabjk](https://avatars.discourse-cdn.com/v4/letter/e/aeb1de/32.png) [@emabjk](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Femabjk)%5C
**Post date:** [April 5, 2023, 8:22am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-use-dataset-in-h5-format%2F35625%2F1 "2023-04-05T08:22:16Z")

</div>

We recently created a dataset in h5 format. We have one main h5 file with all data index by “id”. For train validation and test splits we have separate txt file with which ids belong to train, val or test set. How can we use \_split\_generators and \_generate\_examples in this setting without creating separate h5 files for train, val and test but just reading indexes from corresponding txt files ?
