Writing larger-than-memory dataset #580
-
I have a collection of data with unknown length that is larger than memory on my system. Is there a way I can open a file/dataset in a streaming mode to incrementally write my data and not hold the entire dataset in memory? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi, it seems like we're missing a good, easily accesible example for this. Definitely possible, as HDF5 has growing datasets when one uses chunking (but this needs to be set up at dataset creation time). In addition, with dataspaces, one can select only a subset of the datasets to write to, thus not needing to keep all data in memory at all times. See this part of our unit tests for some basic usage of chunking. I hope that helps! |
Beta Was this translation helpful? Give feedback.
-
It's possible to extend 2d array using h5easy? I checked the code and it seems only supports extending an element but vector. Is there some example for this task using h5easy? |
Beta Was this translation helpful? Give feedback.
Hi, it seems like we're missing a good, easily accesible example for this. Definitely possible, as HDF5 has growing datasets when one uses chunking (but this needs to be set up at dataset creation time). In addition, with dataspaces, one can select only a subset of the datasets to write to, thus not needing to keep all data in memory at all times.
See this part of our unit tests for some basic usage of chunking. I hope that helps!