-
Notifications
You must be signed in to change notification settings - Fork 102
Description
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:
skope-rules/skrules/skope_rules.py
Line 152 in e7f7b93
n_jobs=1, |
skope-rules/skrules/skope_rules.py
Line 169 in e7f7b93
self.n_jobs = n_jobs |
skope-rules/skrules/skope_rules.py
Line 280 in e7f7b93
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!