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

PERF predict_proba is slow when n_jobs > 1 for random forests #16143

Open
tomMoral opened this issue Jan 17, 2020 · 0 comments
Open

PERF predict_proba is slow when n_jobs > 1 for random forests #16143

tomMoral opened this issue Jan 17, 2020 · 0 comments

Comments

@tomMoral
Copy link
Contributor

The use of n_jobs > 1 for small batch can slow down the prediction for forest models. This is probably due to the overhead incurred by using joblib (create thread, check system info, ...) which is dominate the runtime compared to the computations. This was reported originally in joblib/joblib#982.

A couple of ideas to solve this:

  • Set n_jobs=1 when the size of the batch is small.
  • Introduce a n_jobs_predict parameters that would default to 1/n_jobs for forests but that can be set separately.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants