Skip to content

Some ideas for a developer-level API #22432

@WenjieZ

Description

@WenjieZ

Scikit-Learn developers have long been debating about improving the developer utilities (see #15801 and #20657). The current discussion revolves around the adoption of a specific syntax to differentiate the develop API from the common user API. Here, I'd like to propose an alternative solution: package layering.

The idea is to break scikit-learn into 2 separate packages, sklearn and sklearn-core, with the former depending on the latter and the latter providing common utilities for the former. The package sklearn defines the user-level API for common users, and the package sklearn-core defines the develop-level API for developers (including the third-party ones).

drawing

I see this solution as a neater one than using a specific syntax. The decomposition of the package explicitly and unambiguously defines the develop API rather than implicitly. It also encourages the core developers to think more carefully when developing scikit-learn. In addition, it has an extra benefit for third-party packages: they can now depend on the light-weight sklearn-core than the heavy-duty sklearn.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions