Other

class bayes_opt.ScreenLogger(verbose=2, is_constrained=False)

Logger that outputs text, e.g. to log to a terminal.

Parameters:
verbose : int

Verbosity level of the logger.

is_constrained : bool

Whether the logger is associated with a constrained optimization instance.

property is_constrained

Return whether the logger is constrained.

update(event, instance)

Handle incoming events.

Parameters:
event : str

One of the values associated with Events.OPTIMIZATION_START, Events.OPTIMIZATION_STEP or Events.OPTIMIZATION_END.

instance : bayesian_optimization.BayesianOptimization

The instance associated with the step.

property verbose

Return the verbosity level.

class bayes_opt.JSONLogger(path, reset=True)

Logger that outputs steps in JSON format.

The resulting file can be used to restart the optimization from an earlier state.

Parameters:
path : str or bytes or os.PathLike

Path to the file to write to.

reset : bool

Whether to overwrite the file if it already exists.

update(event, instance)

Handle incoming events.

Parameters:
event : str

One of the values associated with Events.OPTIMIZATION_START, Events.OPTIMIZATION_STEP or Events.OPTIMIZATION_END.

instance : bayesian_optimization.BayesianOptimization

The instance associated with the step.

class bayes_opt.Events

Define optimization events.

Behaves similar to enums.