Skip to content

remove n_jobs=1 default #20

@AlJohri

Description

@AlJohri

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions