automl / RoBO

RoBO: a Robust Bayesian Optimization framework
BSD 3-Clause "New" or "Revised" License
482 stars 133 forks source link

Can't run the example #62

Closed WeiFoo closed 7 years ago

WeiFoo commented 7 years ago

Hello,

I just installed RoBo and tried to run some examples. However, all the examples, I got the following errors

Weis-MacBook-Air:examples $ python example_fmin.py 
Traceback (most recent call last):
  File "example_fmin.py", line 4, in <module>
    from robo.fmin import bayesian_optimization
  File "/Users/AA/miniconda2/lib/python2.7/site-packages/RoBO-0.2.1-py2.7.egg/robo/fmin/__init__.py", line 2, in <module>
    from .bayesian_optimization import bayesian_optimization
  File "/Users/AA/miniconda2/lib/python2.7/site-packages/RoBO-0.2.1-py2.7.egg/robo/fmin/bayesian_optimization.py", line 6, in <module>
    from robo.models.gaussian_process import GaussianProcess
  File "/Users/AA/miniconda2/lib/python2.7/site-packages/RoBO-0.2.1-py2.7.egg/robo/models/gaussian_process.py", line 14, in <module>
    class GaussianProcess(BaseModel):
  File "/Users/AA/miniconda2/lib/python2.7/site-packages/RoBO-0.2.1-py2.7.egg/robo/models/gaussian_process.py", line 70, in GaussianProcess
    def train(self, X, y, do_optimize=True):
TypeError: unbound method _check_shapes_train() must be called with BaseModel instance as first argument (got function instance instead)

Thanks for any help!

aaronkl commented 7 years ago

Hi, it looks like you run the example script with python2.7. Could you use python3 instead as python2 is not supported anymore. cheers Aaron

WeiFoo commented 7 years ago

thanks!