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 track ids features ordering for unordered tracks #5320
Conversation
Codecov Report
@@ Coverage Diff @@
## main #5320 +/- ##
==========================================
+ Coverage 89.07% 89.09% +0.02%
==========================================
Files 581 583 +2
Lines 49233 49342 +109
==========================================
+ Hits 43853 43960 +107
- Misses 5380 5382 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
Thanks for the fix @JoOkuma !
I think I just carried over the previous logic in #3730 without thinking too hard about it.
Agreed that the features setter being non-idempotent is a problem, but also agreed we can fix that elsewhere since this PR at least covers the case when features
are not provided and data is unsorted (which might be fairly common). Can you add an issue for that if you haven't already? I think a simple solution might be to only reorder features when data is set, though in general it feels like a pain to keep these two in-sync.
@JoOkuma : the two comments were optional, so I'll merge this after 24 hours unless I hear otherwise. |
Hi @andy-sweet, sorry for the delay. |
Looks good - I'll merge this after 24 hours. The failing check is unrelated - it's our homegrown fuzzing tool via unseeded |
* fix track ids features ordering * improving variable names
* fix track ids features ordering * improving variable names
* fix track ids features ordering * improving variable names
* fix track ids features ordering * improving variable names
* fix track ids features ordering * improving variable names
* fix track ids features ordering * improving variable names
* fix track ids features ordering * improving variable names
Description
The tracks layer automatically adds the
track_id
as a feature. This functionality was broken when the provided tracks were not sorted bytrack_id
andtime
.For example, the
example/tracks_2d.py
colored bytrack_id
with unsorted data.wrong_track_ids.mp4
Note
A track layer features are still not idempotent:
because the
features
getter returns the ordered features whilefeatures
setter expected the original ordering.This should be fixed in another PR.
Type of change
How has this been tested?
Final checklist:
trans.
to make them localizable.For more information see our translations guide.