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

Follow scikit-learn API change #241

Merged
merged 1 commit into from
Mar 22, 2022

Conversation

GaelVaroquaux
Copy link
Member

get_feature_names -> get_feature_names_out

get_feature_names -> get_feature_names_out
@LilianBoulard
Copy link
Member

I think we should check whether the installed version of sklearn is > 1.0, and warn only if it is, as somebody using sklearn < 1.0 would be using the previously standard method (get_feature_names), and get these warnings.
What do you think ?

@GaelVaroquaux
Copy link
Member Author

Thanks for the review!

Actually, I think that I want to push people to change their code ASAP, because it is dangerous to have code using APIs that are deprecated. For dirty-cat, if they see this warning, they can do the change.

@GaelVaroquaux GaelVaroquaux merged commit 52c79b1 into skrub-data:master Mar 22, 2022
@lmeyerov
Copy link

lmeyerov commented Jun 4, 2022

@GaelVaroquaux This seems to have missed https://github.com/dirty-cat/dirty_cat/blob/fb0a1c4216533034e7516efc0698c7e4477b0243/dirty_cat/super_vectorizer.py#L471

pygraphistry/lib/python3.8/site-packages/dirty_cat/super_vectorizer.py:471: in get_feature_names_out
    trans_feature_names = trans.get_feature_names(cols)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
args = (OneHotEncoder(), ['user', 'type']), kwargs = {}
    @functools.wraps(fun)
    def wrapped(*args, **kwargs):
>       warnings.warn(msg, category=FutureWarning)
E       FutureWarning: Function get_feature_names is deprecated; get_feature_names is deprecated in 1.0 and will be removed in 1.2. Please use get_feature_names_out instead.
pygraphistry/lib/python3.8/site-packages/sklearn/utils/deprecation.py:87: FutureWarning

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

Successfully merging this pull request may close these issues.

None yet

3 participants