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
export_to_phy() not respecting n_jobs #2817
Comments
Maybe related to #2696... Thanks for the report. I'll see if I can track this down. EDIT: Although @alejoe91 @samuelgarcia did PCA ever respect the number of cores for EDIT2: Looks like it does use spikeinterface/src/spikeinterface/core/job_tools.py Lines 89 to 93 in 42e1f02
if n_jobs = int(4.0 * os.cpu_count()) which could max out the n_jobs. @cheydrick did you enter 4 as a float or as an int for your script? |
@zm711 it's an int. si.set_global_job_kwargs(n_jobs=4) |
Could you do me a favor and run with |
The other thing we may need to look at is this line where we send the spikeinterface/src/spikeinterface/postprocessing/principal_component.py Lines 351 to 360 in 42e1f02
spikeinterface/src/spikeinterface/core/basesorting.py Lines 651 to 681 in 42e1f02
|
@zm711 Looks like verbose is True by default.
I explicitly set it to True anyways, but the output was the same as in my screenshots above. |
Unfortunately (and this is why verbose needs to be fixed), is that that verbose is just for the function and not at a global level passed into the other functions that accept verbose. So that's why it doesn't do what I wanted. I'll try to dig a bit more by running the PCA by itself and see if I can see what is going on. |
I think we have to wait for @samuelgarcia to comment on this one. But based on my reading the n_jobs being fed into the |
The "Fitting PCA" step in the export to Phy process isn't respecting the n_jobs argument anymore.
I have set the global n_jobs parameter to 4 with:
si.set_global_job_kwargs(n_jobs=4)
When using SpikeInterface from April 17 (commit hash 33d478a) I can see that only four cores are being used while export_to_phy() is running.
However, when using SpikeInterface from May 6 (commit hash 42e1f02) the "Fitting PCA" step is saturating all cores:
Thanks,
Chris
chris@plexon.com
The text was updated successfully, but these errors were encountered: