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

sklearn 0.23 argument issue #154

Closed
MuellerSeb opened this issue May 23, 2020 · 2 comments · Fixed by #157
Closed

sklearn 0.23 argument issue #154

MuellerSeb opened this issue May 23, 2020 · 2 comments · Fixed by #157
Assignees
Milestone

Comments

@MuellerSeb
Copy link
Member

arg_spec = inspect.getfullargspec(GridSearchCV)[0]

This line is not working with the newest version of sklearn, resulting in a missing mean_train_score.

I think, this is because they implemented keyword-only arguments there:
https://github.com/scikit-learn/scikit-learn/blob/fd237278e895b42abe8d8d09105cbb82dc2cbba7/sklearn/model_selection/_search.py#L1174

@MuellerSeb MuellerSeb added this to the v1.5.1 milestone May 23, 2020
@MuellerSeb MuellerSeb self-assigned this May 23, 2020
@MuellerSeb MuellerSeb changed the title sklearn 0.23 argument error sklearn 0.23 argument issue May 23, 2020
@rth
Copy link
Contributor

rth commented May 23, 2020

Yes, we should switch to inspect.signature,

>>> from sklearn.model_selection import GridSearchCV
>>> import inspect
>>> est_sign = inspect.signature(GridSearchCV)
>>> 'return_train_score' in est_sign.parameters
True

@MuellerSeb
Copy link
Member Author

@rth: Cool! Could you come up with a PR?

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

Successfully merging a pull request may close this issue.

2 participants