-
Notifications
You must be signed in to change notification settings - Fork 96
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
Fix package export #1619
Fix package export #1619
Conversation
WalkthroughThe update in the codebase involves a modification to the way maximum frame size is calculated in a video processing context. This change specifically addresses the handling of empty frames to ensure the calculation is robust. There were no changes to function signatures or other global elements, indicating a targeted fix without altering the API or system-wide data structures. Changes
TipsChat with CodeRabbit Bot (
|
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- sleap/io/video.py (1 hunks)
Additional comments: 1
sleap/io/video.py (1)
- 1450-1457: The changes to calculate
max_frame_size
correctly handle the case of empty frames by checking for non-zero length before finding the maximum. This should prevent errors during the export process when dealing with videos that have no labeled frames.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1619 +/- ##
========================================
Coverage 73.37% 73.38%
========================================
Files 134 134
Lines 24024 24024
========================================
+ Hits 17628 17630 +2
+ Misses 6396 6394 -2 ☔ View full report in Codecov by Sentry. |
Description
In #1559, we switched up the format to use zero-padded, constant length byte strings for embedded PNG encoded images for .pkg.slp files.
Right now this throws an error when we export from labels that have videos without any labeled frames, as is common when generating splits or when there are only predictions in a given video (but not user labels).
This PR fixes that by checking for zero length videos during export.
Types of changes
Does this address any currently open issues?
[list open issues here]
Outside contributors checklist
Thank you for contributing to SLEAP!
❤️
Summary by CodeRabbit