automl / labwatch

An extension to Sacred for automated hyperparameter optimization.
59 stars 19 forks source link

'LabAssistant' object has no attribute 'searchspace' #16

Open felixkreuk opened 6 years ago

felixkreuk commented 6 years ago

Hello, I attempt to run the following code:

from sacred import Experiment
from labwatch.assistant import LabAssistant
from labwatch.optimizers.random_search import RandomSearch

ex = Experiment()
la = LabAssistant(ex, database_name='labwatch_demo2',
                  optimizer=RandomSearch)

@la.searchspace
def small_search_space():
    f = UniformInt(lower=32, upper=64, default=32)

@ex.automain
def run(f):
    return f

and get the following error:

If you want to use BayesianOptimization you have to install the following dependencies:
https://github.com/automl/RoBO
george
Traceback (most recent call last):
  File "b.py", line 9, in <module>
    @la.searchspace
AttributeError: 'LabAssistant' object has no attribute 'searchspace'

Am I missing something?

Thanks, Felix.

felixkreuk commented 6 years ago

OK, solved. Problem is the use of @la.searchspace instead of @la.search_space. Is example in the documentation outdated?