poli.objective_repository.white_noise.register.WhiteNoiseBlackBox

poli.objective_repository.white_noise.register.WhiteNoiseBlackBox#

class poli.objective_repository.white_noise.register.WhiteNoiseBlackBox(batch_size: Optional[int] = None, parallelize: bool = False, num_workers: Optional[int] = None, evaluation_budget: int = inf)#

A toy black box function that generates standard Gaussian noise.

Parameters
  • batch_size (int, optional) – The batch size for vectorized evaluation.

  • parallelize (bool, optional) – Whether to parallelize the evaluation.

  • num_workers (int, optional) – The number of workers for parallel evaluation.

  • evaluation_budget (int, optional) – The maximum number of evaluations.

_black_box(x, context=None)#

Returns standard Gaussian noise.

__init__(batch_size: Optional[int] = None, parallelize: bool = False, num_workers: Optional[int] = None, evaluation_budget: int = inf)#

Initializes a WhiteNoiseBlackBox.

Parameters
  • info (ProblemSetupInformation) – The problem setup information.

  • batch_size (int, optional) – The batch size for vectorized evaluation, by default None (i.e. all of the input).

  • parallelize (bool, optional) – Whether to parallelize the evaluation, by default False.

  • num_workers (int, optional) – The number of workers for parallel evaluation, by default None (which corresponds to half the CPUs available, rounded downwards).

  • evaluation_budget (int, optional) – The maximum number of evaluations, by default float(“inf”).

Methods

__init__([batch_size, parallelize, ...])

Initializes a WhiteNoiseBlackBox.

reset_evaluation_budget()

Resets the evaluation budget by setting the number of evaluations made to 0.

set_observer(observer)

Set the observer object for recording observations during evaluation.

terminate()

Terminate the black box optimization problem.