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

remove n_jobs=1 default #20

Open
AlJohri opened this issue Jan 18, 2019 · 3 comments
Open

remove n_jobs=1 default #20

AlJohri opened this issue Jan 18, 2019 · 3 comments

Comments

@AlJohri
Copy link

AlJohri commented Jan 18, 2019

Even when n_jobs is not passed, skope-rules still uses joblib as per the logs. This is because n_jobs defaults to 1 within the SkopeRules class:

self.n_jobs = n_jobs

n_jobs=self.n_jobs,

This should default to None and not be passed into the BaggingClassifier and BaggingRegressor if None to prevent triggering joblib. Something like

extra_kwargs = {)
if self.n_jobs:
    extra_kwargs = {'n_jobs': self.n_jobs}
bagging_clf = BaggingClassifier(..., ..., **extra_kwargs)

If there's an easier way to do ^ please let me know.

This will prevent joblib from triggering at all in the case that n_jobs is None. Much easier to debug parallel processing issues like #18 when I can enable/disable joblib entirely.

Happy to submit a PR for this!

@ngoix
Copy link
Member

ngoix commented Mar 1, 2019

I think we should just default n_jobs to None, though I'm not sure it will change anything. From the joblib doc:

            None is a marker for 'unset' that will be interpreted as n_jobs=1
            (sequential execution) unless the call is performed under a
            parallel_backend context manager that sets another value for
            n_jobs.

@ngoix
Copy link
Member

ngoix commented Mar 1, 2019

you're welcome to open a PR for defaulting to None though

@anilkumarpanda
Copy link

Open a PR for this issue #40

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

No branches or pull requests

3 participants