-
Notifications
You must be signed in to change notification settings - Fork 7
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
Swap out networkx for rustworkx #147
Comments
Thanks for opening the conversation @bentaculum!
I think this is ok. The convenience of networkx is fine but for this package I'm more concerned about speed than I am about the convenenience of the internals. I do think from the perspective of the user we should be taking
I suppose we will need to check! Have you profiled the metrics computation by the way? I'd be interested to see a profile - maybe there's still simple things we can do on our end.
I have no strong preference for keeping the string IDs (they kinda annoy me actually because all my other graphs have int IDs), but I undersand the initial driver of wanting them to be meaningful for a user. |
Fresh profiling with ipython's from traccuracy import run_metrics
from traccuracy.loaders import load_ctc_data
from traccuracy.metrics import CTCMetrics
from traccuracy.matchers import CTCMatcher
gt_data = load_ctc_data(
'/Users/gallusse/data/celltracking/ctc/PhC-C2DL-PSC/train/01_GT/TRA',
'/Users/gallusse/data/celltracking/ctc/PhC-C2DL-PSC/train/01_GT/TRA/man_track.txt'
)
pred_data = load_ctc_data(
'/Users/gallusse/data/celltracking/ctc/PhC-C2DL-PSC/train/01_GT/TRA',
'/Users/gallusse/data/celltracking/ctc/PhC-C2DL-PSC/train/01_GT/TRA/man_track.txt'
)
%time ctc_results = run_metrics(gt_data=gt_data,pred_data=pred_data,matcher=CTCMatcher(),metrics=[CTCMetrics()],)
%lprun -f CTCMatcher._compute_mapping -T profile.txt ctc_results = run_metrics(gt_data=gt_data,pred_data=pred_data,matcher=CTCMatcher(),metrics=[CTCMetrics()],)
|
I coded up a simple speed-up without swapping the backend for now #148. |
I like this, agreed. |
Description
Hi all,
I would like to get started with the once-upon-a-time discussed swapping of the backend from
networkx
torustworkx
https://www.rustworkx.org/index.html.The reason being that for example for basic 2d datasets from the cell tracking challenge (PhC-C2DL-PSC, ~70k nodes), calculating CTCMetrics takes > 1 minute right now.
This seems to be, amongst other things, due to some basic attribute getting from the graph in the matching of GT and predicted nodes.
I anticipate the following challenges:
from_pandas_edgelist()
in graph construction. This there requires dealing with the different API.int
. We currently use strings of formatsegmentation-ID_time
.Has anyone else already given this some more thoughts and would like to pitch in, with either comments or coding together?
Cheers
Ben
Topics
What types of changes are you suggesting? Put an x in the boxes that apply.
Which topics does your change affect? Put an x in the boxes that apply.
TrackingGraph
,run_metrics
,cli
, etc.)Priority
Are you interested in contributing?
The text was updated successfully, but these errors were encountered: