uchicago-cs / deepdish

Flexible HDF5 saving/loading and other data science tools from the University of Chicago
http://deepdish.io
BSD 3-Clause "New" or "Revised" License
271 stars 60 forks source link

Preserving structure when re-saving Keras HDF5 files #27

Open gustavla opened 6 years ago

gustavla commented 6 years ago

In some cases, opening an HDF5 file, editing it, and then re-saving it, can cause detrimental changes to the format. Something that was an attribute might have turned into a group, or vice versa. It would also be nice if it preserved the compression choices of the original file.

I have noticed problems with this for instance with a Keras model saved to HDF5.

This is not a trivial problem to solve and requires storing meta data that may give clues to how it should be saved. It can also be addressed by allowing edits without a full load and re-save, which relates to #22.