poli.objective_factory.create#
- poli.objective_factory.create(name: str, *, seed: Optional[int] = None, observer_init_info: Optional[dict] = None, observer_name: Optional[str] = None, force_isolation: bool = False, batch_size: Optional[int] = None, parallelize: bool = False, num_workers: Optional[int] = None, evaluation_budget: int = inf, quiet: bool = False, **kwargs_for_factory) Problem #
Instantiantes a black-box function by calling the create method of the associated factory.
- Parameters
name (str) β The name of the objective function.
seed (int, optional) β The seed value for random number generation.
observer_init_info (dict, optional) β Optional information about the caller that is forwarded to the logger to initialize the run.
observer_name (str, optional) β The observer to use.
force_isolation (bool, optional) β If True, then the objective function is instantiated as an isolated process.
batch_size (int, optional) β The batch size, passed to the black box to run evaluations on batches. If None, it will evaluate all inputs at once.
parallelize (bool, optional) β If True, then the objective function runs in parallel.
num_workers (int, optional) β When parallelize is True, this specifies the number of processes to use. By default, it uses half the number of available CPUs (rounded down).
evaluation_budget (int, optional) β The maximum number of evaluations allowed. By default, it is infinity.
quiet (bool, optional) β If True, we squelch the messages giving feedback about the creation process. By default, it is False.
**kwargs_for_factory (dict, optional) β Additional keyword arguments for the factory.
- Returns
problem β The black-box function, initial value, and related information.
- Return type
AbstractProblem