-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Orange Table-specific HDF5Reader #6791
base: master
Are you sure you want to change the base?
Conversation
I couldn't find a satisfactory solution to the |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6791 +/- ##
=======================================
Coverage 88.20% 88.21%
=======================================
Files 327 327
Lines 71223 71301 +78
=======================================
+ Hits 62825 62900 +75
- Misses 8398 8401 +3 |
Comments from @stuart-cls (from his email, just so that they do not get lost):
|
Orange/data/io.py
Outdated
for subdomain in ['attributes', 'class_vars', 'metas']: | ||
parsed = [parse(feature) for feature in getattr(data.domain, subdomain)] | ||
domain = np.array([[name, header] for name, header, _ in parsed], 'S') | ||
domain_args = np.array([json.dumps(args) for *_, args in parsed], 'S') |
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.
For domain_args
we should certainly use the variable length h5py string data type. Probably for domain
too.
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.
Done.
In fixing this, switched string handling from fixed-length to variable length https://docs.h5py.org/en/stable/special.html#variable-length-strings
Fix small 'is not' bug
63c71b3
to
c872d57
Compare
Regarding the previous comments:
In general this format isn't doing anything clever with nested dictionaries (see domain_args for example). It would be a lot of work to map this to HDF5, and this is the same problem with
I've tested both ways, it works fine. The new reader checks for "Orange" in the "creator" attribute, but falls back to checking that the "domain" group is there. |
Issue
Enable saving/loading the Orange Table data structure from the binary HDF5 container.
Based on the implementation used in the dask branch, but with the dask parts removed.
Related: #6356
Description of changes
HDF5Reader
with bothread
andwrite_file
methods.h5py
to requirements.metadata
sidecar file to storetable.attributes
if present.Includes