Skip to content
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

n_jobs not being respected between set_global_kwargs and running sorter #2696

Closed
zm711 opened this issue Apr 10, 2024 · 2 comments · Fixed by #2712
Closed

n_jobs not being respected between set_global_kwargs and running sorter #2696

zm711 opened this issue Apr 10, 2024 · 2 comments · Fixed by #2712
Labels
bug Something isn't working sorters Related to sorters module

Comments

@zm711
Copy link
Collaborator

zm711 commented Apr 10, 2024

As discussed in #2690,

image

@zm711 zm711 added the bug Something isn't working label Apr 10, 2024
@alejoe91
Copy link
Member

The problem is this:

In the basesorter.py we have a default_job_kwargs that by default sets n_jobs to -1 (here). My suggestion is to remove this and warn if the sorter requires_binary_data and n_jobs=1, saying that this might make things slower.

Another option (and maybe complementary) is to set default n_jobs globally to something like 0.5.

What do you think @zm711 ?

@zm711
Copy link
Collaborator Author

zm711 commented Apr 10, 2024

In the basesorter.py we have a default_job_kwargs that by default sets n_jobs to -1 (here). My suggestion is to remove this and warn if the sorter requires_binary_data and n_jobs=1, saying that this might make things slower.

I think this sounds right! I don't think we should change the n_jobs without the user knowing!

Another option (and maybe complementary) is to set default n_jobs globally to something like 0.5.

Yeah I'm not sure what the fair value for this would be. Like 0.9 or 0.8 would probably be safe to leave a core or two behind whereas 0.5 would leave more stuff behind. But yeah I think changing the default from -1 would be nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sorters Related to sorters module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants