HIPS / Spearmint

Spearmint Bayesian optimization codebase
Other
1.55k stars 329 forks source link

setting variable to a fixed value #49

Open danielvarga opened 8 years ago

danielvarga commented 8 years ago
  File "~/Spearmint/spearmint/tasks/base_task.py", line 353, in from_unit
    assert(variable['max'] - variable['min'] > 0.0), 'Your specified min (%f) for the variable %s must be less than the max (%f)' % (variable['min'], name, variable['max'])
AssertionError: Your specified min (3.000000) for the variable layerNum must be less than the max (3.000000)

I'd say setting max equal to min is a perfectly valid way to set a variable to a constant. Do you see any complications involved if I want to change the code to make this possible? (I don't promise a pull request, but might consider it.)

What's the current syntax to achieve this within config files?

mzhai2 commented 8 years ago

I would also like to know, right now I am just removing them but thats tedious.

JasperSnoek commented 8 years ago

I don't think this kind of bookkeeping is supported right now. It would require bypassing the models and just storing these values on the side. I think setting the max to the min (and bypassing the validation assert above) would result in the underlying model actually using the value (which would be inefficient).

On Thu, Dec 31, 2015 at 4:56 AM, Michael Zhai notifications@github.com wrote:

I would also like to know, right now I am just removing them but thats tedious.

— Reply to this email directly or view it on GitHub https://github.com/HIPS/Spearmint/issues/49#issuecomment-168159720.