civisanalytics / civis-python

Civis API Python Client
BSD 3-Clause "New" or "Revised" License
34 stars 26 forks source link

account for when n_jobs is none #365

Closed salilgupta1 closed 4 years ago

salilgupta1 commented 4 years ago

sklearn==0.22.0 sets the default for n_jobs to None for LogisticRegression models https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html#sklearn.linear_model.LogisticRegression

This is a breaking change from 0.19.x which set it to 1. The joblib library accounts for this already in a recent bug fix but we don't in our custom backend. Here's the fix.

jacksonllee commented 4 years ago

The fix looks good.

mheilman commented 4 years ago

For posterity, I think this is the analogous part of joblib that checks for None for the multiprocessing backend.

salilgupta1 commented 4 years ago

Are there already tests running through this method? If so we might want to add this test case.

I didn't find any tests for this function.