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

Version 0.3.0 fails tests due to deprecated scikit-learn functionality. #171

Open
stephenpardy opened this issue Jan 11, 2024 · 0 comments

Comments

@stephenpardy
Copy link

The latest release, 0.3.0 fails some tests due to the use of if_delegate_has_method which was removed from sklearn in version 1.3.

Steps:

  • install versin 0.3.0
  • run tests pytest --verbose --pyargs sklearn_extra -k 'not test_all_estimators'
ERROR sklearn_extra/robust/__init__.py - ImportError: cannot import name 'if_delegate_has_method' from 'sklearn.utils.metaestimators' (<PATH>/sklearn-extra/lib/python3.10/site-packages/sklearn/utils/metaestimators.py)
ERROR sklearn_extra/robust/mean_estimators.py - ImportError: cannot import name 'if_delegate_has_method' from 'sklearn.utils.metaestimators' (<PATH>/sklearn-extra/lib/python3.10/site-packages/sklearn/utils/metaestimators.py)
ERROR sklearn_extra/robust/robust_weighted_estimator.py - ImportError: cannot import name 'if_delegate_has_method' from 'sklearn.utils.metaestimators' (<PATH>/sklearn-extra/lib/python3.10/site-packages/sklearn/utils/metaestimators.py)
ERROR sklearn_extra/robust/tests/test_mean_estimators.py - ImportError: cannot import name 'if_delegate_has_method' from 'sklearn.utils.metaestimators' (<PATH>/sklearn-extra/lib/python3.10/site-packages/sklearn/utils/metaestimators.py)
ERROR sklearn_extra/robust/tests/test_mean_estimators.py
ERROR sklearn_extra/robust/tests/test_robust_weighted_estimator.py - ImportError: cannot import name 'if_delegate_has_method' from 'sklearn.utils.metaestimators' (<PATH>/sklearn-extra/lib/python3.10/site-packages/sklearn/utils/metaestimators.py)
ERROR sklearn_extra/robust/tests/test_robust_weighted_estimator.py
ERROR sklearn_extra/tests/test_common.py - ImportError: cannot import name 'if_delegate_has_method' from 'sklearn.utils.metaestimators' (<PATH>/sklearn-extra/lib/python3.10/site-packages/sklearn/utils/metaestimators.py)
ERROR sklearn_extra/tests/test_common.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 9 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

This has already been fixed in a recent PR: 0f95d8d
So we would just need to cut a new release. Alternatively you could cut a bugfix release for version 0.3.0 that pinned the dependencies with an upper pin.

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

No branches or pull requests

1 participant