-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
MAINT conversion old->new/new->old tags (bis) #30327
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
Conversation
OK it looks good for be reviewed. I'll push a last commit to cover the uncovered line. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nits, but LGTM.
Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
do you understand the doc build failure here? |
No, is let's try to restart since the azure build went through at install :) |
I'm not sure what happen first but I suspect that something killed the process. |
OK this is reproducible. Let me check if there is an unpinned dependency that was bumped yesterday. |
I cannot spot a single difference in the versions of packages, this is really weird. |
yeah it's odd, and it's not a timeout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Being backward compatible adds so much complexity. I mostly have nits, otherwise LGTM
"`sklearn.base.ClassifierMixin`, `sklearn.base.RegressorMixin`, and " | ||
"`sklearn.base.OutlierMixin`. From scikit-learn 1.7, not defining " | ||
"`__sklearn_tags__` will raise an error.", | ||
category=FutureWarning, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normally, I would go with a DeprecationWarning
for developer focused changes. It's unfortunate that users will see this warning too if a library has a custom _more_tags
. I do not see a good way around it because users can also write their own estimators with custom _more_tags
.
In any case, I am okay with the current implementation.
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
This is the story of my life in |
This reverts commit 4149013.
Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com> Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com> Co-authored-by: Loïc Estève <loic.esteve@ymail.com>
Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com> Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com> Co-authored-by: Loïc Estève <loic.esteve@ymail.com>
Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com> Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com> Co-authored-by: Loïc Estève <loic.esteve@ymail.com>
closes #30298
closes #30302
closes #30324
closes #30257
Alternative to #30302
This PR is re-introduce back
_get_tags
,_more_tags
, and_safe_tags
. This is raising a deprecation warning.To achieve backward compatibility, we convert the
__sklearn_tags__
on the fly to the_more_tags
previous api by checking what tag a specific class is setting. Then, we can use the MRO walk through as in the previous version.I added tests for several combination of estimators old-new with several mixins to ensure that we cover most of the cases that currently exists in the wild.