Skip to content

[BUG] ImportError: cannot import name '_get_column_indices' from 'sklearn.utils with pre-release versions #1080

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
Zethson opened this issue May 6, 2024 · 1 comment

Comments

@Zethson
Copy link

Zethson commented May 6, 2024

Describe the bug

Incompatibility with pre-release scikit-learn

Steps/Code to Reproduce

Install pre-release versions of imbalanced-learn dependencies

Import the package

Expected Results

Actual Results

/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/ehrapy/init.py:12: in
from ehrapy import data as dt
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/ehrapy/data/init.py:1: in
from ehrapy.data._datasets import (
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/ehrapy/data/_datasets.py:6: in
from ehrapy.io._read import read_csv, read_fhir, read_h5ad
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/ehrapy/io/init.py:1: in
from ehrapy.io._read import df_to_anndata, read_csv, read_fhir, read_h5ad
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/ehrapy/io/_read.py:18: in
from ehrapy.preprocessing._encoding import encode
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/ehrapy/preprocessing/init.py:1: in
from ehrapy.preprocessing._balanced_sampling import balanced_sample
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/ehrapy/preprocessing/_balanced_sampling.py:9: in
from imblearn.over_sampling import RandomOverSampler
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/imblearn/init.py:52: in
from . import (
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/imblearn/combine/init.py:5: in
from ._smote_enn import SMOTEENN
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/imblearn/combine/_smote_enn.py:13: in
from ..over_sampling import SMOTE
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/imblearn/over_sampling/init.py:8: in
from ._smote import SMOTE, SMOTEN, SMOTENC, SVMSMOTE, BorderlineSMOTE, KMeansSMOTE
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/imblearn/over_sampling/_smote/init.py:1: in
from .base import SMOTE, SMOTEN, SMOTENC
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/imblearn/over_sampling/_smote/base.py:18: in
from sklearn.utils import (
E ImportError: cannot import name '_get_column_indices' from 'sklearn.utils' (/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/sklearn/utils/init.py)

Versions

scikit-learn==1.5.0rc1

@Zethson
Copy link
Author

Zethson commented May 9, 2024

Ahh this was already fixed with #1074

Then we just need the release.

@Zethson Zethson closed this as completed May 9, 2024
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