Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change Deprecation warning to Error #406

Merged
merged 2 commits into from
Apr 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions bayes_opt/bayesian_optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,10 @@ def maximize(self,

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

if acquisition_function is None:
util = UtilityFunction(kind='ucb',
Expand Down