Skip to content

Commit d2d35b6

Browse files
authored
Merge pull request #406 from fmfn/fix_old_param_behavior
change Deprecation warning to Error
2 parents cf13889 + 57ad6ef commit d2d35b6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

bayes_opt/bayesian_optimization.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,10 @@ def maximize(self,
285285

286286
old_params_used = any([param is not None for param in [acq, kappa, kappa_decay, kappa_decay_delay, xi]])
287287
if old_params_used or gp_params:
288-
warnings.warn('\nPassing acquisition function parameters or gaussian process parameters to maximize'
289-
'\nis no longer supported, and will cause an error in future releases. Instead,'
290-
'\nplease use the "set_gp_params" method to set the gp params, and pass an instance'
291-
'\n of bayes_opt.util.UtilityFunction using the acquisition_function argument\n',
292-
DeprecationWarning, stacklevel=2)
288+
raise Exception('\nPassing acquisition function parameters or gaussian process parameters to maximize'
289+
'\nis no longer supported. Instead,please use the "set_gp_params" method to set'
290+
'\n the gp params, and pass an instance of bayes_opt.util.UtilityFunction'
291+
'\n using the acquisition_function argument\n')
293292

294293
if acquisition_function is None:
295294
util = UtilityFunction(kind='ucb',

0 commit comments

Comments
 (0)