Giter VIP home page Giter VIP logo

Comments (15)

ChristoferNal avatar ChristoferNal commented on July 24, 2024 2

@tkrishp @zpardos I have the same issue with hyperopt-0.0.3.dev0
Have you found any solution?

from hyperopt-sklearn.

tulasikparadarami avatar tulasikparadarami commented on July 24, 2024 1

I'm having same problem when running the example provided in Hyperas (as pointed out @zpardos ). Does anyone know how to fix it?

Traceback (most recent call last):
  File "grid_search.py", line 77, in <module>
    trials=Trials())
  File "/opt/anaconda2/envs/thesis/lib/python2.7/site-packages/hyperas/optim.py", line 31, in minimize
    best_run = base_minimizer(model, data, algo, max_evals, trials, rseed)
  File "/opt/anaconda2/envs/thesis/lib/python2.7/site-packages/hyperas/optim.py", line 111, in base_minimizer
    rseed=rseed)
TypeError: fmin() got an unexpected keyword argument 'rseed'

from hyperopt-sklearn.

bjkomer avatar bjkomer commented on July 24, 2024

It looks like hyperopt-sklearn is expecting a newer version of hyperopt, and the version that pip installs by default is not new enough. A workaround would be to install the latest version of hyperopt from source.

Something like this should do the trick:

git clone https://github.com/hyperopt/hyperopt.git
cd hyperopt
pip install -e .

from hyperopt-sklearn.

Data-drone avatar Data-drone commented on July 24, 2024

I tried this and I get an issue with distribute. I get:

Obtaining file:///home/vagrant/hyperopt
  Running setup.py (path:/home/vagrant/hyperopt/setup.py) egg_info for package from file:///home/vagrant/hyperopt
    Extracting in /tmp/tmpSMITP1
    Now working in /tmp/tmpSMITP1/distribute-0.6.38
    Building a Distribute egg in /home/vagrant/hyperopt
    Traceback (most recent call last):
      File "setup.py", line 248, in <module>
        scripts = scripts,
      File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
        _setup_distribution = dist = klass(attrs)
      File "/tmp/tmpSMITP1/distribute-0.6.38/setuptools/dist.py", line 225, in __init__
        _Distribution.__init__(self,attrs)
      File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
        self.finalize_options()
      File "/tmp/tmpSMITP1/distribute-0.6.38/setuptools/dist.py", line 257, in finalize_options
        ep.require(installer=self.fetch_build_egg)
      File "/tmp/tmpSMITP1/distribute-0.6.38/pkg_resources.py", line 2027, in require
        working_set.resolve(self.dist.requires(self.extras),env,installer))
      File "/tmp/tmpSMITP1/distribute-0.6.38/pkg_resources.py", line 2237, in requires
        dm = self._dep_map
      File "/tmp/tmpSMITP1/distribute-0.6.38/pkg_resources.py", line 2466, in _dep_map
        self.__dep_map = self._compute_dependencies()
      File "/tmp/tmpSMITP1/distribute-0.6.38/pkg_resources.py", line 2499, in _compute_dependencies
        common = frozenset(reqs_for_extra(None))
      File "/tmp/tmpSMITP1/distribute-0.6.38/pkg_resources.py", line 2496, in reqs_for_extra
        if req.marker_fn(override={'extra':extra}):
      File "/tmp/tmpSMITP1/distribute-0.6.38/_markerlib/markers.py", line 109, in marker_fn
        return eval(compiled_marker, environment)
      File "<environment marker>", line 1, in <module>
    NameError: name 'sys_platform' is not defined
    /home/vagrant/hyperopt/distribute-0.6.38-py2.7.egg
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/home/vagrant/hyperopt/setup.py", line 37, in <module>
        distribute_setup.use_setuptools()
      File "distribute_setup.py", line 152, in use_setuptools
        return _do_download(version, download_base, to_dir, download_delay)
      File "distribute_setup.py", line 132, in _do_download
        _build_egg(egg, tarball, to_dir)
      File "distribute_setup.py", line 123, in _build_egg
        raise IOError('Could not build the egg.')
    IOError: Could not build the egg.
    Complete output from command python setup.py egg_info:
    Extracting in /tmp/tmpSMITP1

Now working in /tmp/tmpSMITP1/distribute-0.6.38

Building a Distribute egg in /home/vagrant/hyperopt

Traceback (most recent call last):

  File "setup.py", line 248, in <module>

    scripts = scripts,

  File "/usr/lib/python2.7/distutils/core.py", line 111, in setup

    _setup_distribution = dist = klass(attrs)

  File "/tmp/tmpSMITP1/distribute-0.6.38/setuptools/dist.py", line 225, in __init__

    _Distribution.__init__(self,attrs)

  File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__

    self.finalize_options()

  File "/tmp/tmpSMITP1/distribute-0.6.38/setuptools/dist.py", line 257, in finalize_options

    ep.require(installer=self.fetch_build_egg)

  File "/tmp/tmpSMITP1/distribute-0.6.38/pkg_resources.py", line 2027, in require

    working_set.resolve(self.dist.requires(self.extras),env,installer))

  File "/tmp/tmpSMITP1/distribute-0.6.38/pkg_resources.py", line 2237, in requires

    dm = self._dep_map

  File "/tmp/tmpSMITP1/distribute-0.6.38/pkg_resources.py", line 2466, in _dep_map

    self.__dep_map = self._compute_dependencies()

  File "/tmp/tmpSMITP1/distribute-0.6.38/pkg_resources.py", line 2499, in _compute_dependencies

    common = frozenset(reqs_for_extra(None))

  File "/tmp/tmpSMITP1/distribute-0.6.38/pkg_resources.py", line 2496, in reqs_for_extra

    if req.marker_fn(override={'extra':extra}):

  File "/tmp/tmpSMITP1/distribute-0.6.38/_markerlib/markers.py", line 109, in marker_fn

    return eval(compiled_marker, environment)

  File "<environment marker>", line 1, in <module>

NameError: name 'sys_platform' is not defined

/home/vagrant/hyperopt/distribute-0.6.38-py2.7.egg

Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/home/vagrant/hyperopt/setup.py", line 37, in <module>

    distribute_setup.use_setuptools()

  File "distribute_setup.py", line 152, in use_setuptools

    return _do_download(version, download_base, to_dir, download_delay)

  File "distribute_setup.py", line 132, in _do_download

    _build_egg(egg, tarball, to_dir)

  File "distribute_setup.py", line 123, in _build_egg

    raise IOError('Could not build the egg.')

IOError: Could not build the egg.

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /home/vagrant/hyperopt
Storing debug log for failure in /home/vagrant/.pip/pip.log`

Any ideas?

from hyperopt-sklearn.

lesson1221 avatar lesson1221 commented on July 24, 2024

I met the same rstate problem. It seems that the function fmin() in lastest version of hyperopt has some conflict with fmin() in hyperopt-sklearn. Is there any way to solve this problem? Thanks if someone can help me

from hyperopt-sklearn.

nipunsadvilkar avatar nipunsadvilkar commented on July 24, 2024

Facing similar issue

TypeError: fmin() got an unexpected keyword argument 'rstate'

Any solution for this?

from hyperopt-sklearn.

bjkomer avatar bjkomer commented on July 24, 2024

I've started working on a fix for this. hyperopt-sklearn is only compatible with newer versions of hyperopt from github, and not the older on that is on PyPI. I'm hoping to get in a workaround to make it backwards compatible, but it looks like there are more issues than just the arguments not matching up.

The easiest thing to do in the meantime would be to install hyperopt from github and use that version.

from hyperopt-sklearn.

bjkomer avatar bjkomer commented on July 24, 2024

@crazy449 I'm seeing a similar error when I try to install using distrubute_setup.py on hyperopt

I'm not familiar with distribute, so I don't know what's going on there. Do other methods of installation work for you?

I commonly do (from within the hyperopt folder): pip install -e . and I think python setup.py install may work as well

from hyperopt-sklearn.

zpardos avatar zpardos commented on July 24, 2024

running the Hyperas example (https://github.com/maxpumperla/hyperas), I get a very similar error. I don't think Hyperas uses hyperopt-sklearn, so it looks to be an issue with hyperopt.

Traceback (most recent call last):
File "hyper_example.py", line 77, in
trials=Trials())
File "/usr/local/lib/python3.5/dist-packages/hyperas/optim.py", line 31, in minimize
best_run = base_minimizer(model, data, algo, max_evals, trials, rseed)
File "/usr/local/lib/python3.5/dist-packages/hyperas/optim.py", line 111, in base_minimizer
rseed=rseed)
TypeError: fmin() got an unexpected keyword argument 'rseed'

I'm using the github version of hyperopt (0.0.3dev)

from hyperopt-sklearn.

jaganadhg avatar jaganadhg commented on July 24, 2024

The ISSUE is still there

C:\Users\jaganadhg\AppData\Local\Continuum\Anaconda2\lib\site-packages\hpsklearn\estimator.pyc in fit_iter(self, X, y, EX_list, valid_size, n_folds, cv_shuffle, random_state, weights, increment)
    582                           #    so we notice them.
    583                           catch_eval_exceptions=False,
--> 584                           return_argmin=False,  # -- in case no success so far
    585                          )
    586 

TypeError: fmin() got an unexpected keyword argument 'rstate'

from hyperopt-sklearn.

bjkomer avatar bjkomer commented on July 24, 2024

This should hopefully be working now. hyperopt-sklearn will now check to see if you are using an older version of hyperopt and use the correct parameter names for it.

from hyperopt-sklearn.

ehknight avatar ehknight commented on July 24, 2024

@tkrishp @zpardos bump. Any movement on this?

from hyperopt-sklearn.

Benjamin-Lee avatar Benjamin-Lee commented on July 24, 2024

Still having the issue on with version 0.2.

Traceback (most recent call last):
  File "basic_hyperas_test.py", line 27, in <module>
    trials=Trials())
  File "/usr/local/lib/python2.7/dist-packages/hyperas/optim.py", line 31, in minimize
    best_run = base_minimizer(model, data, algo, max_evals, trials, rseed)
  File "/usr/local/lib/python2.7/dist-packages/hyperas/optim.py", line 111, in base_minimizer
    rseed=rseed)
TypeError: fmin() got an unexpected keyword argument 'rseed'

from hyperopt-sklearn.

iyliamjd avatar iyliamjd commented on July 24, 2024

Still having the issue on with version 0.2.

Traceback (most recent call last):
  File "basic_hyperas_test.py", line 27, in <module>
    trials=Trials())
  File "/usr/local/lib/python2.7/dist-packages/hyperas/optim.py", line 31, in minimize
    best_run = base_minimizer(model, data, algo, max_evals, trials, rseed)
  File "/usr/local/lib/python2.7/dist-packages/hyperas/optim.py", line 111, in base_minimizer
    rseed=rseed)
TypeError: fmin() got an unexpected keyword argument 'rseed'

I also got this issue, have anyone solve it? Because when I change to randomState(seed). got a lot untrace errors

from hyperopt-sklearn.

bjkomer avatar bjkomer commented on July 24, 2024

@Benjamin-Lee @iyliamjd from the trace of your error the issue is from the package hyperas and not hyperopt-sklearn. The core of the issue is an older version of hyperopt had a parameter called rseed but that has been replaced with rstate (this change was made about 6 years ago).

hyperopt-sklearn has been made to be backwards compatible with both version, and it looks like hyperas has as well. Likely you just need to update to the latest versions of these packages from github.

from hyperopt-sklearn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.