-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
n_jobs in GridSearchCV issue (again in 0.18.1) #9264
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
Comments
Does the problem go away when using n_jobs=1?
Looking at the errors it seems that the error is due to an invalid y.
|
accuracy is a classification score. elastic net is a regressor. they
shouldn't work together.
…On 3 Jul 2017 2:53 pm, "Gael Varoquaux" ***@***.***> wrote:
Does the problem go away when using n_jobs=1?
Looking at the errors it seems that the error is due to an invalid y.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#9264 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEz685pUXA0YyvhbaE6-cq0GrGqmFNtks5sKHPOgaJpZM4OLwDb>
.
|
@GaelVaroquaux Yup, it only occurs with n_jobs > 1. Fixing the errors with the invalid y does not change it. However, the scoring fixed it. Had missed that I hadn't updated the scoring. @jnothman Thanks for that, this was the issue! Not entirely sure why this brought out the issue though. |
I'll try to improve the error message from "Can't handle mix of binary and
continuous" to "Classification metrics can't handle mix of binary and
continuous targets".
…On 4 July 2017 at 10:38, Zeerak Waseem ***@***.***> wrote:
@GaelVaroquaux <https://github.com/gaelvaroquaux> Yup, it only occurs
with n_jobs > 1. Fixing the errors with the invalid y does not change it.
However, the scoring fixed it. Had missed that I hadn't updated the scoring.
@jnothman <https://github.com/jnothman> Thanks for that, this was the
issue! Not entirely sure why this brought out the issue though.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9264 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEz6_QINNi-wSufktWL2HIsiekZr3m_ks5sKYmagaJpZM4OLwDb>
.
|
fitted_models = {} Loop through model pipelines, tuning each one and saving it to fitted_modelsfor name, pipeline in pipelines.items():
It gives following error: During handling of the above exception, another exception occurred: Traceback (most recent call last): ValueError Wed Oct 3 16:16:44 2018 [97 rows x 449 columns], 54 0 ........................................................................... [97 rows x 449 columns], 54 0 ........................................................................... [97 rows x 449 columns], y=54 0 [86 rows x 449 columns] ........................................................................... [86 rows x 449 columns], y=8 0 [86 rows x 449 columns] ........................................................................... [86 rows x 449 columns], y=8 0 ........................................................................... [86 rows x 449 columns], 8 0 [86 rows x 449 columns], 8 0 ........................................................................... [86 rows x 449 columns], y=8 0 [86 rows x 449 columns] ........................................................................... [86 rows x 449 columns], y=8 0 [86 rows x 449 columns] ........................................................................... [86 rows x 449 columns], y=8 0 [86 rows x 449 columns] ........................................................................... [86 rows x 449 columns], y=8 0 ........................................................................... ........................................................................... ValueError: Input contains NaN, infinity or a value too large for dtype('float64'). """ The above exception was the direct cause of the following exception: TransportableException Traceback (most recent call last) ~\Anaconda3\lib\multiprocessing\pool.py in get(self, timeout) TransportableException: TransportableException ValueError Wed Oct 3 16:16:44 2018 [97 rows x 449 columns], 54 0 ........................................................................... [97 rows x 449 columns], 54 0 ........................................................................... [97 rows x 449 columns], y=54 0 [86 rows x 449 columns] ........................................................................... [86 rows x 449 columns], y=8 0 [86 rows x 449 columns] ........................................................................... [86 rows x 449 columns], y=8 0 ........................................................................... [86 rows x 449 columns], 8 0 [86 rows x 449 columns], 8 0 ........................................................................... [86 rows x 449 columns], y=8 0 [86 rows x 449 columns] ........................................................................... [86 rows x 449 columns], y=8 0 [86 rows x 449 columns] ........................................................................... [86 rows x 449 columns], y=8 0 [86 rows x 449 columns] ........................................................................... [86 rows x 449 columns], y=8 0 ........................................................................... ........................................................................... ValueError: Input contains NaN, infinity or a value too large for dtype('float64'). During handling of the above exception, another exception occurred: JoblibValueError Traceback (most recent call last) ~\Anaconda3\lib\site-packages\sklearn\model_selection_search.py in fit(self, X, y, groups, **fit_params) ~\Anaconda3\lib\site-packages\sklearn\externals\joblib\parallel.py in call(self, iterable) ~\Anaconda3\lib\site-packages\sklearn\externals\joblib\parallel.py in retrieve(self) JoblibValueError: JoblibValueError Multiprocessing exception: ........................................................................... ........................................................................... ........................................................................... ........................................................................... ........................................................................... ........................................................................... ........................................................................... ........................................................................... ........................................................................... ........................................................................... ........................................................................... ........................................................................... ........................................................................... ........................................................................... ........................................................................... ........................................................................... ........................................................................... ........................................................................... ........................................................................... ........................................................................... ........................................................................... ........................................................................... ........................................................................... [10 rows x 104 columns], 11: Token Number AGE F16-Leave F17-Leave PE...121 4.206000 [10 rows x 104 columns], 12: array([[<matplotlib.axes._subplots.AxesSubplot o...ect at 0x0000020EA1F31AC8>]], [122 rows x 449 columns], 'X_test': Token Number AGE F16-Leave F17-Leave J... 1 [25 rows x 449 columns], 'X_train': Token Number AGE F16-Leave F17-Leave J... 1 [97 rows x 449 columns], ...} [10 rows x 104 columns], 11: Token Number AGE F16-Leave F17-Leave PE...121 4.206000 [10 rows x 104 columns], 12: array([[<matplotlib.axes._subplots.AxesSubplot o...ect at 0x0000020EA1F31AC8>]], [122 rows x 449 columns], 'X_test': Token Number AGE F16-Leave F17-Leave J... 1 [25 rows x 449 columns], 'X_train': Token Number AGE F16-Leave F17-Leave J... 1 [97 rows x 449 columns], ...} ........................................................................... ........................................................................... [97 rows x 449 columns], y=54 0 [97 rows x 449 columns] ........................................................................... Sub-process traceback:ValueError Wed Oct 3 16:16:44 2018 [97 rows x 449 columns], 54 0 ........................................................................... [97 rows x 449 columns], 54 0 ........................................................................... [97 rows x 449 columns], y=54 0 [86 rows x 449 columns] ........................................................................... [86 rows x 449 columns], y=8 0 [86 rows x 449 columns] ........................................................................... [86 rows x 449 columns], y=8 0 ........................................................................... [86 rows x 449 columns], 8 0 [86 rows x 449 columns], 8 0 ........................................................................... [86 rows x 449 columns], y=8 0 [86 rows x 449 columns] ........................................................................... [86 rows x 449 columns], y=8 0 [86 rows x 449 columns] ........................................................................... [86 rows x 449 columns], y=8 0 [86 rows x 449 columns] ........................................................................... [86 rows x 449 columns], y=8 0 ........................................................................... ........................................................................... ValueError: Input contains NaN, infinity or a value too large for dtype('float64'). |
plz someone help me Its urgent |
This is a usage question, not a software development issue. Please see
elsewhere, such as stack overflow. But you've certainly not presented your
issue with enough information for anyone to help. It is not minimal and
verifiable. It does not indicate what the data is or the estimator.
|
Hey, thanks for an awesome library!
There's a bit of an issue (seemingly the same as #6147) with GridSearchCV, which seems to be in 0.18.1 as well as having been present in previous versions. I get the issue when using GridSearchCV with the ElasticNet classifier:
Actual Results
Sub-process traceback:
Versions
platform.platform(): Linux-4.2.3-300.fc23.x86_64-x86_64-with-fedora-25-Twenty_Five
sys.version: Python 3.6.0 |Anaconda 4.3.1 (64-bit)| (default, Dec 23 2016, 12:22:00)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]
numpy.version: NumPy 1.11.3
scipy.version: SciPy 0.18.1
sklearn.version: Scikit-Learn 0.18.1
The text was updated successfully, but these errors were encountered: