Skip to content

Revisting the tags interface #20804

@thomasjpfan

Description

@thomasjpfan

With #20657 (__sklearn_is_fitted__) merged I am starting to rethink the tags implementation how we walk the MRO. I think tags would be much easier to use if it was a protocol like __sklearn_tags__. This way all mixins and subclasses must call super().__sklearn_tags__() and update it themselves. This makes it so that third party developers do not need to import BaseEstimator or the whole tags machinery to take advantage of tags.

I recall this was discussed in #8022 but I do not know why it was rejected.

BTW If we had a simpler and easier to extend tags interface, I use a "is_fitted" tag into it with default value: "implicit".

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions