8000 Unable to import joblib after update to 1.1.0 · Issue #23383 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

Unable to import joblib after update to 1.1.0 #23383

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
edgBR opened this issue May 16, 2022 · 3 comments
Closed

Unable to import joblib after update to 1.1.0 #23383

edgBR opened this issue May 16, 2022 · 3 comments
Labels
Bug Needs Triage Issue requires triage

Comments

@edgBR
Copy link
edgBR commented May 16, 2022

Describe the bug

Hi community,

I was very excited after the get_features_names_out fixes in 1.1 and I wanted to incorporate changes in my training code according to that.

However now Im getting and error regarding joblib. Code to reproduce below:

Steps/Code to Reproduce

from azureml.core import Run, Datastore, Workspace
from sklearn.preprocessing import LabelEncoder
from sklearn.model_selection import train_test_split, cross_validate
from sklearn.metrics import make_scorer, mean_tweedie_deviance
from sklearn.pipeline import Pipeline
from sklearn.compose import ColumnTransformer
from sklearn.compose import make_column_selector as selector
from sklearn.compose import TransformedTargetRegressor
from sklearn.preprocessing import StandardScaler, OneHotEncoder
from sklearn.feature_selection import VarianceThreshold
from sklearn.impute import SimpleImputer
from sklearn.metrics import mean_absolute_error
from sklearn.metrics import roc_auc_score, confusion_matrix
from sklearn.metrics import ConfusionMatrixDisplay
from imblearn.over_sampling import SMOTE, RandomOverSampler
from imblearn.combine import SMOTEENN
from imblearn.under_sampling import RandomUnderSampler
from imblearn.pipeline import Pipeline
import xgboost as xgb
import joblib
import pandas as pd
import numpy as np
import argparse

Expected Results

No error is thrown

Actual Results

Traceback (most recent call last):
File "main.py", line 9, in
ImportError: cannot import name '_joblib_parallel_args' from 'sklearn.utils.fixes' (/azureml-envs/azureml_7e9749cc412d37eccb74a0bf3ca8abb2/lib/python3.8/site-packages/sklearn/utils/fixes.py)

Versions

Conda environment:

channels:
  - anaconda
  - conda-forge
  - defaults
dependencies:
  - python=3.8.10
  - pip=20.1.1=py38_1
  - pip:
      - azureml-core==1.41.0
      - azureml-interpret==1.41.0
      - azureml-sdk==1.41.0
      - imbalanced-learn==0.9.0
      - numpy== 1.19.5
      - pandas==1.4.0
      - scikit-learn==1.1.0
      - scipy==1.5.2
      - seaborn==0.11.2
      - xgboost==1.4.2
name: test1.1
@edgBR edgBR added Bug Needs Triage Issue requires triage labels May 16, 2022
@lesteve
Copy link
Member
lesteve commented May 16, 2022

Probably because imbalanced-learn has not been released yet, so it is not compatible with scikit-learn 1.1.0? See scikit-learn-contrib/imbalanced-learn#894 for more details.

@glemaitre
Copy link
Member

I am personally on it. The bug fix release will be available by tonight on PyPI and conda-forge and compatible with scikit-learn 1.0

@glemaitre
Copy link
Member

Closing since the release is new release is available in PyPI and shortly in conda-forge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Needs Triage Issue requires triage
Projects
None yet
Development

No branches or pull requests

3 participants
0