ClimbsRocks / auto_ml

[UNMAINTAINED] Automated machine learning for analytics & production
http://auto-ml.readthedocs.io
MIT License
1.64k stars 310 forks source link

ImportError: cannot import name 'Bunch' #339

Closed PaulVanDev closed 7 years ago

PaulVanDev commented 7 years ago

Hi,

I'm stuck, First I had the issue Argument 'X' has incorrect type (expected numpy.ndarray, got csr_matrix)

335

I tried to update sklearn, I had 0.18.1 and still 0.18.1, perhaps a dependency was updated. I've got auto_ml-2.7.7 -> ImportError: cannot import name 'Bunch'


ImportError Traceback (most recent call last)

in () 10 import pandas 11 print(pandas.__version__) ---> 12 from auto_ml import Predictor 13 14 C:\Users\pv\Anaconda3\lib\site-packages\auto_ml\__init__.py in () 4 """ 5 ----> 6 from auto_ml.predictor import Predictor 7 from auto_ml._version import __version__ C:\Users\pv\Anaconda3\lib\site-packages\auto_ml\predictor.py in () 31 32 ---> 33 from auto_ml import DataFrameVectorizer 34 from auto_ml import utils 35 from auto_ml import utils_categorical_ensembling C:\Users\pv\Anaconda3\lib\site-packages\auto_ml\DataFrameVectorizer.py in () 9 from sklearn.externals import six 10 ---> 11 from auto_ml.utils import ExtendedLabelEncoder 12 13 bad_vals_as_strings = set([str(float('nan')), str(float('inf')), str(float('-inf')), 'None', 'none', 'NaN', 'NAN', 'nan', 'NULL', 'null', '', 'inf', '-inf']) C:\Users\pv\Anaconda3\lib\site-packages\auto_ml\utils.py in () 8 from sklearn.datasets import load_boston 9 from sklearn.model_selection import train_test_split ---> 10 from sklearn.pipeline import Pipeline 11 from sklearn.preprocessing import LabelEncoder 12 from sklearn.utils.metaestimators import if_delegate_has_method C:\Users\pv\Anaconda3\lib\site-packages\sklearn\pipeline.py in () 19 from .externals import six 20 from .utils.metaestimators import if_delegate_has_method ---> 21 from .utils import Bunch 22 from .utils.validation import check_memory 23 ImportError: cannot import name 'Bunch'
PaulVanDev commented 7 years ago

an idea what I should try to update?

ClimbsRocks commented 7 years ago

The errors being thrown by sklearn in conda, so that's certainly where I'd start. If you're using conda, it's also possible you have multiple versions of sklearn installed in different places on your machine, so you may want to nuke as many of them as you can, then reinstall only the upgraded version in only the place you need it.

What issue did you run into with 0.18.1? 0.19 is the main version we support, but I'd like to support 0.18 as well, ideally.

On Tue, Oct 24, 2017 at 6:12 AM PaulVanDev notifications@github.com wrote:

an idea what I should try to update?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ClimbsRocks/auto_ml/issues/339#issuecomment-338984975, or mute the thread https://github.com/notifications/unsubscribe-auth/AGsSVai45xyP7ZXOoUI7ELvQo7xt_ee7ks5sveIygaJpZM4QEZeA .

PaulVanDev commented 7 years ago

Ok sorry, I didn't succeed to update to 0.19.1 probably that some instances of anaconda were still running. A fresh restart, now it works, thank you and sorry again

ClimbsRocks commented 7 years ago

no worries! versioning issues are the cool part of the job, right?

would love to hear any other feedback you have!