evhub / bbopt

Black box hyperparameter optimization made easy.
Apache License 2.0
75 stars 8 forks source link

Not able to run the optimizer more than 10 times for Keras implementation #1

Closed eagq closed 5 years ago

eagq commented 6 years ago

Hi!

I don't know if I should post this here but I encountered some difficulties trying to run your code on a Keras example more than 10 times at the 11th time I get an error like this:

TypeError: get_params() missing 1 required positional argument: 'self'

I don't why I get this if the code was able to run 10 times previously! I hope you can help.

Thanks in advance :)

evhub commented 6 years ago

@eagq Can I see the full traceback of the error you're experiencing?

eagq commented 6 years ago

@evhub Sure, here it is:

Traceback (most recent call last):

  File "<ipython-input-2-7ba8ea49ba13>", line 9, in <module>
    bb.run(backend="scikit-optimize")

  File "/home/edgar/anaconda3/lib/python3.6/site-packages/bbopt/optimizer.py", line 63, in run
    self._backend = backend_registry.init_backend(backend, self._examples, self._old_params, **kwargs)

  File "/home/edgar/anaconda3/lib/python3.6/site-packages/bbopt/backends/__init__.py", line 77, in init_backend
    return self[name](examples, params, **kwargs)

  File "/home/edgar/anaconda3/lib/python3.6/site-packages/bbopt/backends/skopt.py", line 72, in __init__
    optimizer.tell(data_points, losses)

  File "/home/edgar/anaconda3/lib/python3.6/site-packages/skopt/optimizer/optimizer.py", line 428, in tell
    return self._tell(x, y, fit=fit)

  File "/home/edgar/anaconda3/lib/python3.6/site-packages/skopt/optimizer/optimizer.py", line 467, in _tell
    est = clone(self.base_estimator_)

  File "/home/edgar/anaconda3/lib/python3.6/site-packages/sklearn/base.py", line 60, in clone
    new_object_params = estimator.get_params(deep=False)

TypeError: get_params() missing 1 required positional argument: 'self'
evhub commented 5 years ago

After a long hiatus of not working on this project, I've resumed work and have just fixed this issue.