HunterMcGushion / hyperparameter_hunter

Easy hyperparameter optimization and automatic result saving across machine learning algorithms and libraries
MIT License
704 stars 100 forks source link

Problem with library scikit-optimize in Python 3.6 #210

Closed leandroimail closed 4 years ago

leandroimail commented 4 years ago

I try to use the HyperparameterHunter but when I import the library I received the following error:

Traceback (most recent call last): File "", line 1, in File "C:\Users\leand\Anaconda3\lib\site-packages\hyperparameter_hunter__init__.py", line 16, in from .importer import hook_keras_layer, hook_keras_initializers File "C:\Users\leand\Anaconda3\lib\site-packages\hyperparameter_hunter\importer.py", line 13, in from hyperparameter_hunter.tracers import ArgumentTracer, LocationTracer File "C:\Users\leand\Anaconda3\lib\site-packages\hyperparameter_hunter\tracers.py", line 18, in from hyperparameter_hunter.space.dimensions import Real, Integer, Categorical File "C:\Users\leand\Anaconda3\lib\site-packages\hyperparameter_hunter\space\dimensions.py", line 40, in from skopt.space.transformers import CategoricalEncoder, Normalize, Identity, Log10, Pipeline ImportError: cannot import name 'Log10'

I believe that error can be an incompatibility version.

leandroimail commented 4 years ago

I created an empty virtualenv and installed just hyperparameter_hunter. Every dependency was installed by hyperparameter_hunter, but even so, the problem persists.

I got the requirements to help in this question, so below my packages installed in venv:

attrs==19.3.0 bleach==3.1.0 decorator==4.4.1 defusedxml==0.6.0 dill==0.3.1.1 entrypoints==0.3 hyperparameter-hunter==3.0.0 importlib-metadata==1.5.0 ipython-genutils==0.2.0 Jinja2==2.11.1 joblib==0.14.1 jsonschema==3.2.0 jupyter-core==4.6.1 MarkupSafe==1.1.1 mistune==0.8.4 nbconvert==5.6.1 nbformat==5.0.4 numpy==1.18.1 pandas==1.0.0 pandocfilters==1.4.2 pyaml==19.12.0 Pygments==2.5.2 pyrsistent==0.15.7 python-dateutil==2.8.1 pytz==2019.3 pywin32==227 PyYAML==5.3 scikit-learn==0.22.1 scikit-optimize==0.7.1 scipy==1.4.1 simplejson==3.17.0 six==1.14.0 testpath==0.4.4 traitlets==4.3.3 webencodings==0.5.1 wrapt==1.11.2 zipp==2.1.0

leandroimail commented 4 years ago

This work when I unistalled scikit-optimize version 0.7.1 and installed version 0.5.2

HunterMcGushion commented 4 years ago

@leandroimail, sorry for the very late response! Thank you for reporting this and for figuring out which versions are working! I really appreciate your help. I'm looking into a fix now

HunterMcGushion commented 4 years ago

@leandroimail, would you be able to try again using the current master branch? On my end, it seems to be fixed, but if you're still getting the error, then let's reopen this issue.

leandroimail commented 4 years ago

Sorry @HunterMcGushion , I only saw your message now. I gonna try the new version and tomorrow I put here the results. Thanks for your work.

chrinide commented 4 years ago

Hi all, I have tried to run the sklearn_examples https://github.com/HunterMcGushion/hyperparameter_hunter/blob/master/examples/sklearn_examples/classification.py

I got similar error:

ImportError: cannot import name 'Log10' from 'skopt.space.transformers' (/root/miniconda3/envs/psi4/lib/python3.7/site-packages/skopt/space/transformers.py)

ruzihao commented 4 years ago

Hey guys, getting the same error. Is there any solutions?

HunterMcGushion commented 4 years ago

Hi, @chrinide and @ruzihao, thanks for commenting! Can you try installing the current master branch to see if the issue persists? As far as I could tell, the bug was fixed, but it hasn't been included in a formal release yet. If the master branch works for you two, I'll make a new release incorporating the bugfix. Otherwise, if you're still experiencing the bug, could you open a new issue, please? Thanks a lot for your help!

ruzihao commented 4 years ago

Hi @HunterMcGushion , I've tried and confirmed the issue has been fixed. It works for me now. Thanks a lot!