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

Fix sklearn v1.3 Import for MissingValues #998

Closed
wants to merge 1 commit into from
Closed

Fix sklearn v1.3 Import for MissingValues #998

wants to merge 1 commit into from

Conversation

prohde
Copy link

@prohde prohde commented Jul 6, 2023

Fixes #995
Fixes #996
Closes #997

What does this implement/fix? Explain your changes.

This PR fixes the import of sklearn.utils._param_validation._MissingValues in version 1.3 of sklearn. The underscore has been removed; so from version 1.3 it is sklearn.utils._param_validation.MissingValues (see scikit-learn/scikit-learn#26774). Following the current logic in imblearn.utils._param_validation, the version of sklearn is checked and the import handled based on the installed version. Which is much better than simply removing the import as suggested by #997.

Any other comments?

#987 suggested to set the minimum version of sklearn to 1.2.1. I agree with the suggestion. It seems that by implementing said PR, only the above mentioned import needs to be handled differently based on the installed version of sklearn, i.e., either 1.2 or 1.3.

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