The current code is
def suggest(self, **optim_kwargs):
"""
Maps Optimizer.suggest method
"""
if self.optimizer.is_fit:
try:
# In case X_space has changed, re-set the optimizer X_space
self.optimizer.set_X_space(self.X_space)
X, eval = self.optimizer.suggest(objective=self.objective,
out_constraints=self.output_constraints,
**optim_kwargs)
return (X, eval)
except Exception:
warnings.warn('Optimization failed')
return None
objective=self.objective is passed in and objective could be within optim_kwargs, which I think should be allowed as well.
Additionally, the try... except.. block, while catches all errors, almost silently suppress the error, so there is no way for users to know what exactly happened. It will make sense to print out traceback information at higher verbosity.
The current code is
objective=self.objectiveis passed in andobjectivecould be withinoptim_kwargs, which I think should be allowed as well.Additionally, the try... except.. block, while catches all errors, almost silently suppress the error, so there is no way for users to know what exactly happened. It will make sense to print out traceback information at higher verbosity.