Closed lambdaloop closed 10 months ago
The changes primarily focus on enhancing data handling in the HDF5 format. They introduce checks for data types, conversion of JSON attributes, and casting of arrays into complex data types. The modifications ensure robustness and consistency in data processing.
File | Summary |
---|---|
.../format/hdf5.py |
Introduced checks for JSON attribute data types and conversion if necessary. Added cast_as_compound function to cast arrays into complex data types. Arrays points_dset , pred_points_dset , instances_dset , and frames_dset are now cast into complex dtypes. old_labels variable is assigned the result of decoding the JSON attribute. |
🐇
"In the land of code, where the shadows lie,
A rabbit hopped, with a twinkle in its eye.
Casting arrays, checking types, oh so sly,
Ensuring data flows, under the binary sky. 🌌"
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Attention: 10 lines
in your changes are missing coverage. Please review.
Comparison is base (
2d24296
) 73.38% compared to head (4e5ce45
) 73.36%. Report is 1 commits behind head on develop.
Files | Patch % | Lines |
---|---|---|
sleap/io/format/hdf5.py | 61.53% | 10 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@roomrys @talmo Any chance you could merge this? This would allow people to export slp datasets from a web annotation system (such as https://lambdaloop.com/anivia/ ) and then load them into SLEAP.
Description
This makes the loading of slp files more robust. Specifically, it allows storing points, pred_points, frames, and instances as non-compound types in the h5 file, by casting them as needed.
It is backwards compatible with the previous code, so that the default slp files load fine.
Types of changes
Does this address any currently open issues?
[list open issues here]
Outside contributors checklist
Thank you for contributing to SLEAP!
:heart:
Summary by CodeRabbit