rename track_id to tracklet_id for consistency#213
Open
TeunHuijben wants to merge 1 commit intomainfrom
Open
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #213 +/- ##
==========================================
+ Coverage 93.31% 93.48% +0.17%
==========================================
Files 59 59
Lines 3217 3241 +24
==========================================
+ Hits 3002 3030 +28
+ Misses 215 211 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There was a severe inconsistency in the naming of the
TRACKLET_KEYthroughout the repo. This wasn't surfaced by the tests, because all conftest and pre-computed graphs had "track_id", and not any other name. This PR: 1) resolved the inconsistency, 2) updates all tests accordingly, 3) speeds up track_id calculation. Claude blurp:The codebase had two strings for the same concept:
DEFAULT_TRACKLET_KEY = "tracklet_id"— the public name exported fromfuntracks.annotators(what downstream callers like motile_tracker import)."track_id"— hardcoded as the default inTracks.__init__, plus as string literals in validation, exports, and the annotator registry.When a caller passed
node_name_map={"tracklet_id": "...", ...}(the documented public spelling), the builder loaded the column under graph attribute"tracklet_id"but then calledSolutionTracks(graph=...)without forwardingtracklet_attr=.Tracks.__init__defaulted it to"track_id", didn't find that on the graph, and silently recomputed tracklet IDs fromweakly_connected_componentsunder a fresh"track_id"column. The user's original data was orphaned;tracks.features.tracklet_keypointed at the recomputed values — same number of unique tracklets, different assignments.The fix collapses both failures: one canonical default everywhere (
DEFAULT_TRACKLET_KEY), the builder forwards the key actually present innode_propstoSolutionTracks(tracklet_attr=...), and a fallback in_setup_core_computed_featureslets pre-2.0 saved data (still using the literal"track_id") load without recompute.