hyperopt / hyperopt-gpsmbo Goto Github PK
View Code? Open in Web Editor NEWGaussian Process optimization algorithm for Hyperopt
License: Other
Gaussian Process optimization algorithm for Hyperopt
License: Other
It would be nice to see real bayesian optimization and GP in hyperpot. Does this package work? Should we have hyperopt installed? It would be also nice to have some examples in the readme. Thanks!
Hi @jaberg,
Thanks for the package! This extension on hyperopt can be very handy.
I was trying to run fmin with algo=ei.suggest and got the error message above. The full error message is as follows:
AttributeError Traceback (most recent call last)
~/anaconda/envs/ldsa/lib/python3.6/site-packages/hp_gpsmbo/hpsuggest_ei.py in init_fns(self)
18 try:
---> 19 self._cost_deriv
20 except AttributeError:
AttributeError: 'DomainGP_EI' object has no attribute '_cost_deriv'
During handling of the above exception, another exception occurred:
TypeError Traceback (most recent call last)
<ipython-input-146-b79d81f8328e> in <module>()
5 #algo=ucb.suggest,
6 max_evals = 30,
----> 7 trials=trials)
8 rf_best
~/anaconda/envs/ldsa/lib/python3.6/site-packages/hyperopt/fmin.py in fmin(fn, space, algo, max_evals, trials, rstate, allow_trials_fmin, pass_expr_memo_ctrl, catch_eval_exceptions, verbose, return_argmin)
305 verbose=verbose,
306 catch_eval_exceptions=catch_eval_exceptions,
--> 307 return_argmin=return_argmin,
308 )
309
~/anaconda/envs/ldsa/lib/python3.6/site-packages/hyperopt/base.py in fmin(self, fn, space, algo, max_evals, rstate, verbose, pass_expr_memo_ctrl, catch_eval_exceptions, return_argmin)
633 pass_expr_memo_ctrl=pass_expr_memo_ctrl,
634 catch_eval_exceptions=catch_eval_exceptions,
--> 635 return_argmin=return_argmin)
636
637
~/anaconda/envs/ldsa/lib/python3.6/site-packages/hyperopt/fmin.py in fmin(fn, space, algo, max_evals, trials, rstate, allow_trials_fmin, pass_expr_memo_ctrl, catch_eval_exceptions, verbose, return_argmin)
318 verbose=verbose)
319 rval.catch_eval_exceptions = catch_eval_exceptions
--> 320 rval.exhaust()
321 if return_argmin:
322 return trials.argmin
~/anaconda/envs/ldsa/lib/python3.6/site-packages/hyperopt/fmin.py in exhaust(self)
197 def exhaust(self):
198 n_done = len(self.trials)
--> 199 self.run(self.max_evals - n_done, block_until_done=self.async)
200 self.trials.refresh()
201 return self
~/anaconda/envs/ldsa/lib/python3.6/site-packages/hyperopt/fmin.py in run(self, N, block_until_done)
155 d['result'].get('status')))
156 new_trials = algo(new_ids, self.domain, trials,
--> 157 self.rstate.randint(2 ** 31 - 1))
158 assert len(new_ids) >= len(new_trials)
159 if len(new_trials):
~/anaconda/envs/ldsa/lib/python3.6/site-packages/hp_gpsmbo/hpsuggest_ei.py in suggest(new_ids, domain, trials, seed, warmup_cutoff, n_buckshots, n_finetunes, stop_at, plot_contours, gp_fit_method, failure_loss, max_ei_thresh)
200 n_buckshots=n_buckshots,
201 n_finetunes=n_finetunes,
--> 202 rng=rng,
203 )
204 t1 = time.time()
~/anaconda/envs/ldsa/lib/python3.6/site-packages/hp_gpsmbo/hpsuggest_ei.py in optimize_over_X(self, n_buckshots, n_finetunes, rng)
137 n_finetunes,
138 rng,
--> 139 ret_raw=True)
140 if len(self.gpr._params_list) == 1:
141 Ks = self._K_new(np.atleast_2d(rval_raw),
~/anaconda/envs/ldsa/lib/python3.6/site-packages/hp_gpsmbo/hpsuggest.py in optimize_over_X(self, n_buckshots, n_finetunes, rng, ret_raw, ret_results)
360 # -- sample a bunch of points
361 buckshot = self.draw_n_feature_vecs(n_buckshots, rng)
--> 362 buckshot_crit = self.crit(buckshot)
363 best_first = np.argsort(buckshot_crit)
364 #print 'buckshot stats', buckshot_crit.min(), buckshot_crit.max()
~/anaconda/envs/ldsa/lib/python3.6/site-packages/hp_gpsmbo/hpsuggest_ei.py in crit(self, X)
95
96 def crit(self, X):
---> 97 self.init_fns()
98 #return -self.gpr.logEI(X,
99 #self._EI_thresh,
~/anaconda/envs/ldsa/lib/python3.6/site-packages/hp_gpsmbo/hpsuggest_ei.py in init_fns(self)
53 on_unused_input='ignore',
54 allow_input_downcast=True,
---> 55 profile=0)
56 op_Kcond.use_lazy_cholesky = None
57 op_Kcond.use_lazy_cholesky_idx = None
~/anaconda/envs/ldsa/lib/python3.6/site-packages/theano/compile/function.py in function(inputs, outputs, mode, updates, givens, no_default_updates, accept_inplace, name, rebuild_strict, allow_input_downcast, profile, on_unused_input)
315 on_unused_input=on_unused_input,
316 profile=profile,
--> 317 output_keys=output_keys)
318 return fn
~/anaconda/envs/ldsa/lib/python3.6/site-packages/theano/compile/pfunc.py in pfunc(params, outputs, mode, updates, givens, no_default_updates, accept_inplace, name, rebuild_strict, allow_input_downcast, profile, on_unused_input, output_keys)
484 accept_inplace=accept_inplace, name=name,
485 profile=profile, on_unused_input=on_unused_input,
--> 486 output_keys=output_keys)
487
488
~/anaconda/envs/ldsa/lib/python3.6/site-packages/theano/compile/function_module.py in orig_function(inputs, outputs, mode, accept_inplace, name, profile, on_unused_input, output_keys)
1839 name=name)
1840 with theano.change_flags(compute_test_value="off"):
-> 1841 fn = m.create(defaults)
1842 finally:
1843 t2 = time.time()
~/anaconda/envs/ldsa/lib/python3.6/site-packages/theano/compile/function_module.py in create(self, input_storage, trustme, storage_map)
1713 theano.config.traceback.limit = theano.config.traceback.compile_limit
1714 _fn, _i, _o = self.linker.make_thunk(
-> 1715 input_storage=input_storage_lists, storage_map=storage_map)
1716 finally:
1717 theano.config.traceback.limit = limit_orig
~/anaconda/envs/ldsa/lib/python3.6/site-packages/theano/gof/link.py in make_thunk(self, input_storage, output_storage, storage_map)
697 return self.make_all(input_storage=input_storage,
698 output_storage=output_storage,
--> 699 storage_map=storage_map)[:3]
700
701 def make_all(self, input_storage, output_storage):
~/anaconda/envs/ldsa/lib/python3.6/site-packages/theano/gof/vm.py in make_all(self, profiler, input_storage, output_storage, storage_map)
1089 compute_map,
1090 [],
-> 1091 impl=impl))
1092 linker_make_thunk_time[node] = time.time() - thunk_start
1093 if not hasattr(thunks[-1], 'lazy'):
TypeError: ('The following error happened while compiling the node', <hp_gpsmbo.op_Kcond.LazyCholesky object at 0x1364166d8>(Elemwise{Composite{((i0 * exp((((-maximum(((i1 + i2) - i3), i4)) / i5) + (i6 * maximum(((i7 + i8) - i9), i4)) + log(i10)))) + (i11 * i12))}}[(0, 3)].0, reuse_cholesky, reuse_cholesky_idx), '\n', "make_thunk() got an unexpected keyword argument 'impl'")
Any suggestions on what could be going wrong?
Much appreciated!
Miguel
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.