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

How to set n_jobs = -1 from tpot #558

Closed
lesshaste opened this issue Sep 5, 2017 · 5 comments
Closed

How to set n_jobs = -1 from tpot #558

lesshaste opened this issue Sep 5, 2017 · 5 comments
Labels

Comments

@lesshaste
Copy link

I am trying out the simple MNIST digit recognition example from https://rhiever.github.io/tpot/examples/ .

I noticed that only one core was being used despite many of the sklearn classifiers supporting n_jobs.

Context of the issue

Is there a simple way to add n_jobs to those classifiers that support it through tpot?

Process to reproduce the issue

Run the simple MNIST digit recognition example from https://rhiever.github.io/tpot/examples/
Run top. Press 1 to see number of cores being used.

Expected result

It would be great if all the cores were used.

Current result

Only one core is used.

Possible fix

Tpot could pass n_jobs = -1 to those classifiers that support it.

@weixuanfu
Copy link
Contributor

weixuanfu commented Sep 5, 2017

Please check TPOT API. TPOT allows parallel computing during optimization process with n_jobs parameter.

@lesshaste
Copy link
Author

Thank you and I apologize for not having seen that before.

@rhiever
Copy link
Contributor

rhiever commented Sep 5, 2017

There are two ways to accomplish this task. You can do what @weixuanfu suggested and set TPOT's n_jobs parameter, which will parallelize TPOT's pipeline evaluation process. You can also make your own custom TPOT configuration to set all of the n_jobs parameters of the individual algorithms. However, I recommend using TPOT's parallelization rather than parallelizing the individual algorithms.

@HamedMP
Copy link

HamedMP commented Jun 12, 2018

I try to set n_jobs to any value other than 1, like -1, 2, 4, ..., the cpu core usage goes to 100% but no progress is shown on the notebook. And no result get returned after waiting for hours, tested with latest version of tpot, both on mac and ubuntu I have the same problem. It would be good to parallelize training.
Found related to #645

@shaunstoltz
Copy link

Dosnt work, use something else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants