HIPS / Spearmint

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

BetaWarp UserWarning: BetaWarp encountered negative values #27

Open iahs opened 9 years ago

iahs commented 9 years ago

Spearmint is issuing the following warning 1-20 times between suggestions: /.../spearmint/transformations/beta_warp.py:206: UserWarning: BetaWarp encountered negative values: [ -1.08420217e-19] warnings.warn('BetaWarp encountered negative values: %s' % inputs[inputs<0])

My variables are 2 ints in [0,63] and an enum, and objective function is a float in [-100000, 0].

Am I doing something wrong?

Python 2.7.8 on Ubuntu, Spearmint master@c97959a (latest)

Config file: { "experiment-name" : "main", "resources" : { "local" : { "scheduler" : "local", "max-concurrent" : 5, "max-finished-jobs" : 100 } }, "tasks": { "asc" : { "type" : "OBJECTIVE", "likelihood" : "GAUSSIAN", "main-file" : "main.py", "language" : "PYTHON", "resources" : ["local"] } }, "variables" : { "a" : { "type" : "ENUM", "size" : 1, "options" : ["17a", "17f", "184", "18a", "18d", "190", "193", "19a", "19b", "19f", "1a2", "1a5", "1a9", "1ac", "1b3", "1b4", "1b8", "1bb", "1be", "1c0", "1c3", "1ca", "1cb", "1cf", "1d2", "1d5", "1d9", "1db", "1de", "1e5", "1e6", "1ea", "1ed", "1f0", "1f3", "1f6", "1fa", "1fd", "200", "202", "205", "208", "20b", "210", "215", "21a", "21f", "221", "225", "229", "22b", "22f", "233", "235", "239", "23f", "243", "249"] }, "b" : { "type" : "INT", "size" : 1, "min" : 0, "max" : 63 }, "c" : { "type" : "INT", "size" : 1, "min" : 8, "max" : 63 } } }

mechaman commented 9 years ago

I am having the same issue. Some clarification would be nice :)

JasperSnoek commented 9 years ago

Sorry about that. You can safely ignore that warning. Basically, L-BFGS sometimes returns values that are just a little more than machine precision outside of the specified bounds. That caused us a nefarious bug when things we thought were in the unit hypercube became negative. So now we just round back to 0 and then show that warning. The warning is probably unnecessary.

On Tue, Jun 30, 2015 at 1:06 AM, Julien Hoachuck notifications@github.com wrote:

I am having the same issue. Some clarification would be nice :)

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