Conversation
…tribute-selection Allow attribute selection in subgraph views
This reverts commit 4abd84f.
…ph' into partial_update_track_id
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #158 +/- ##
==========================================
+ Coverage 87.78% 87.97% +0.18%
==========================================
Files 50 50
Lines 3357 3392 +35
Branches 570 581 +11
==========================================
+ Hits 2947 2984 +37
+ Misses 248 246 -2
Partials 162 162 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Jordão Bragantini <jordao.bragantini@gmail.com>
| assert isinstance(tracks_graph, rx.PyDiGraph) | ||
|
|
||
| # Check that re-assigning track IDs without reset works as expected | ||
| graph_backend.update_node_attrs(attrs={DEFAULT_ATTR_KEYS.TRACK_ID: -1}) |
There was a problem hiding this comment.
| graph_backend.update_node_attrs(attrs={DEFAULT_ATTR_KEYS.TRACK_ID: -1}) |
Should we remove this line because of your comment says without reset?
There was a problem hiding this comment.
Thanks for the comment, I intended to reset the track IDs here, so that I can check in the following line starting with tracks_graph_reassign=!
Is it clearer if I split this to another test?
| raise NotImplementedError(f"{self.__class__.__name__} backend does not support track id assignment.") | ||
|
|
||
| # Internal utility to compute the exact set of nodes to assign when a subset is requested | ||
| def _compute_track_node_ids(self, seeds: list[int] | None) -> list[int]: |
There was a problem hiding this comment.
I really like this function, I can see some use cases besides updating track_ids
Do you think we could rename and remove the _ prefix to make it "public"?
I'm not really good at naming functions. I thought of non_branching_connected_nodes or non_branching_connected_components, but I'm open to your suggestions.
There was a problem hiding this comment.
Yeah, sounds great! I'm not sure which is better, but could connected_tracklet_nodes be an option, for example? I just wanted to find a shorter name. Or superset_tracklet_nodes?
There was a problem hiding this comment.
Or possibly tracklet_nodes or all_tracklet_nodes makes sense.
There was a problem hiding this comment.
@yfukai, I like tracklet_nodes the most, it's short and straight to the point, thanks for the suggestions
Co-authored-by: Jordão Bragantini <jordao.bragantini@gmail.com>
Co-authored-by: Jordão Bragantini <jordao.bragantini@gmail.com>
| assert isinstance(tracks_graph, rx.PyDiGraph) | ||
|
|
||
| # Check that re-assigning track IDs without reset works as expected | ||
| graph_backend.update_node_attrs(attrs={DEFAULT_ATTR_KEYS.TRACK_ID: -1}) |
There was a problem hiding this comment.
Thanks for the comment, I intended to reset the track IDs here, so that I can check in the following line starting with tracks_graph_reassign=!
Is it clearer if I split this to another test?
| raise NotImplementedError(f"{self.__class__.__name__} backend does not support track id assignment.") | ||
|
|
||
| # Internal utility to compute the exact set of nodes to assign when a subset is requested | ||
| def _compute_track_node_ids(self, seeds: list[int] | None) -> list[int]: |
There was a problem hiding this comment.
Yeah, sounds great! I'm not sure which is better, but could connected_tracklet_nodes be an option, for example? I just wanted to find a shorter name. Or superset_tracklet_nodes?
|
I updated the function name! I don't have the merge right but please feel free to go ahead 🙏 |
|
I forgot about that again. Thanks! |
This is a fresh implementation of #151. In this PR,
assign_track_idstakes thenode_idsargument asThat only updates the track IDs for a subset of nodes connected to nodes specified by
node_idswhile maintaining the overall consistency of the ID assignment.