automl / RoBO

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

Handling optional dependencies for bnn #53

Closed edublancas closed 7 years ago

edublancas commented 7 years ago

I just made a little change to better handle optional dependencies for bnn.

When doing:

from robo.fmin import bayesian_optimization

The package failed since __init__.py loads bohamiann, which needs theano and other optional dependencies.

Now the import works fine and the error is raised until bohamian is instantiated.

edublancas commented 7 years ago

I forgot to add the case when dependencies are installed, I'll fix that later today

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.07%) to 66.576% when pulling b83740822595d0f7263fedbd8a82be4e638d254f on edublancas:master into 6078facca8719f0c9ac2ccaf7ae58bc1a6062a00 on automl:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.07%) to 66.576% when pulling b83740822595d0f7263fedbd8a82be4e638d254f on edublancas:master into 6078facca8719f0c9ac2ccaf7ae58bc1a6062a00 on automl:master.

edublancas commented 7 years ago

Done. I also improved the error handling in bayesian_optimization to raise errors instead of using print. But the build is broken and I'm not sure if the changes I made are causing the problem.