Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Make transition from 1.5 to 1.6 easier for third-party library using scikit-learn utilities #30298

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

Closed
glemaitre opened this issue Nov 18, 2024 · 1 comment · Fixed by #30327
Closed
Assignees
Labels
Milestone

Comments

@glemaitre
Copy link
Member

In 1.6, we introduced several breaking changes:

  • self._validate_data became sklearn.utils.validation.validate_data
  • self._check_n_features became sklearn.utils.validation.check_n_features
  • self._check_feature_names became sklearn.utils.validation.check_feature_names
  • a complete revamp for the tag infrastructure

While that all these changes are intended to improve the quality of life of third-party libraries by providing public utilities, it is going to break estimators and will require some boilerplate code to be compatible across scikit-learn version.

While those tools are private, it seems that we should still make a deprecation cycle such that we warn about the changes and start to raise error in future version (1.8).

@glemaitre
Copy link
Member Author

So #30327 seems to resolve some issue regarding the tag with a way forward.

I also want to point that I'm planning to make a small package in order to support the 4 latest version of scikit-learn with minimal pain (or at least the pain in centralized in one place).

I'll use imbalanced-learn and skrub to collect what tools are needed and centralize them here: https://github.com/glemaitre/sklearn_compat. I plan to move this package in the scikit-learn-contrib if we don't plan to take the maintenance hit in scikit-learn itself.

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

Successfully merging a pull request may close this issue.

1 participant