-
Notifications
You must be signed in to change notification settings - Fork 203
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
Re-enable n_jobs in multi-comparison #3747
base: main
Are you sure you want to change the base?
Conversation
src/spikeinterface/comparison/tests/test_multisortingcomparison.py
Outdated
Show resolved
Hide resolved
Absolutely! Thank you so much |
job_list = [] | ||
job_names = [] | ||
for i in range(len(self.object_list)): | ||
for j in range(i + 1, len(self.object_list)): | ||
if self.name_list is not None: | ||
name_i = self.name_list[i] | ||
name_j = self.name_list[j] | ||
else: | ||
name_i = "object i" | ||
name_j = "object j" | ||
job_list.append((i, j)) | ||
job_names.append((name_i, name_j)) |
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.
Refactor this
Hi, just to make sure I am doing the right thing (sorry for lack of experience), I should use |
As long as you have spikeinterface installed from sources, yes! You can also try the other agreement method ( |
Hi, I completed my tests. I did not find much difference, maybe I downloaded the incorrect patch? I tested agreement_method='counts' (took ~7.5 hours to complete both before and after) and agreement_method='count' (took ~7.75 hours to compete before and after the change). I am supposed to patch with #3747? Thanks! |
How did you install from this PR? My suggestion is:
|
@paul-aparicio I realized that the
n_jobs
parameter was actually not used.This PR adds it back and updates the parallelization using the
ProcessPoolExecutor
. This will run each comparison in parallel.A simple test shows that the results are >10x faster (on my machine - 8 CPUs).
Can you test this PR? you just need to add the
n_jobs=-1
to thecompare_multiple_sorters