Skip to content

scikit-learn version bug when importing auto-sklearn #1060

Open
@KyuhwanYeon

Description

@KyuhwanYeon

Describe the bug

Please describe the bug you're experiencing is precise as possible.
In order to use auto-sklearn in kaggle environment, I successfully intalled it. However, It shows the error when it is imported.

Firstly, I want to share scikit-learn and auto-sklearn package version in my kaggle environment

import sklearn
!pip show scikit-learn
!pip show auto-sklearn
import autosklearn.regression ## Auto ML package
Name: scikit-learn
Version: 0.24.0
Summary: A set of python modules for machine learning and data mining
Home-page: http://scikit-learn.org
Author: None
Author-email: None
License: new BSD
Location: /opt/conda/lib/python3.7/site-packages
Requires: threadpoolctl, joblib, numpy, scipy
Required-by: yellowbrick, Wordbatch, wfdb, vecstack, umap-learn, tsfresh, TPOT, smac, sklearn, sklearn-pandas, sklearn-contrib-py-earth, shap, scikit-plot, scikit-optimize, scattertext, rgf-python, pysal, PDPbox, nilearn, mlxtend, mapclassify, lime, lightgbm, lightfm, librosa, kmodes, kmapper, keras-tuner, imbalanced-learn, hypertools, hpsklearn, hmmlearn, hep-ml, gplearn, fastai, fancyimpute, eli5, chainer-chemistry, cesium, category-encoders, catalyst, Boruta, bayesian-optimization, autogluon.core, auto-sklearn, allennlp
Name: auto-sklearn
Version: 0.12.1
Summary: Automated machine learning.
Home-page: https://automl.github.io/auto-sklearn
Author: Matthias Feurer
Author-email: [email protected]
License: BSD
Location: /opt/conda/lib/python3.7/site-packages
Requires: scipy, ConfigSpace, numpy, pyyaml, setuptools, pyrfr, distributed, pandas, liac-arff, smac, joblib, pynisher, dask, scikit-learn
Required-by: 

Then, If I tried to import auto-sklearn
import autosklearn.regression ## Auto ML package
The result :

---------------------------------------------------------------------------
IncorrectPackageVersionError              Traceback (most recent call last)
<ipython-input-15-5994a3903e7c> in <module>
      5 get_ipython().system('pip show scikit-learn')
      6 get_ipython().system('pip show auto-sklearn')
----> 7 import autosklearn.regression ## Auto ML package

/opt/conda/lib/python3.7/site-packages/autosklearn/__init__.py in <module>
     11 requirements = requirements.decode('utf-8')
     12 
---> 13 dependencies.verify_packages(requirements)
     14 
     15 if os.name != 'posix':

/opt/conda/lib/python3.7/site-packages/autosklearn/util/dependencies.py in verify_packages(packages)
     23             operation = match.group('operation1')
     24             version = match.group('version1')
---> 25             _verify_package(name, operation, version)
     26         else:
     27             raise ValueError('Unable to read requirement: %s' % package)

/opt/conda/lib/python3.7/site-packages/autosklearn/util/dependencies.py in _verify_package(name, operation, version)
     60     if not check:
     61         raise IncorrectPackageVersionError(name, installed_version, operation,
---> 62                                            required_version)
     63 
     64 

IncorrectPackageVersionError: found 'scikit-learn' version 0.23.2 but requires scikit-learn version >=0.24.0

I can't understand why found 'scikit-learn' version 0.23.2 but requires scikit-learn version >=0.24.0
Because, in the kaggle environment, scikit-learn=0.24 not 0.23.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions