poli.objective_factory.start#
- poli.objective_factory.start(name: str, seed: Optional[int] = None, caller_info: Optional[dict] = None, observer_name: Optional[str] = None, force_isolation: bool = False, **kwargs_for_factory) AbstractBlackBox #
Starts the black-box function.
Works just like create, but it returns only the black-box function and resets the evaluation budget.
One example of running this function:
```python from poli import objective_factory
- with objective_factory.start(name=”aloha”) as f:
x = np.array([“F”, “L”, “E”, “A”, “S”]).reshape(1, -1) y = f(x) print(x, y)
If the black-box function is created as an isolated process, then it will automatically close when the context manager is closed.
- Parameters
name (str) – The name of the objective function.
seed (int, optional) – The seed value for random number generation.
caller_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.
**kwargs_for_factory (dict, optional) – Additional keyword arguments for the factory.