poli.core.util.external_observer.ExternalObserver

poli.core.util.external_observer.ExternalObserver#

class poli.core.util.external_observer.ExternalObserver(observer_name: Optional[str] = None, **kwargs_for_observer)#

An external version of the observer class to be instantiated in isolated processes.

Parameters
  • observer_name (str, optional) – The name of the observer. If not provided, the default observer name will be used.

  • **kwargs_for_observer – Additional keyword arguments to be passed to the observer.

observe(x, y, context=None)#

Sends the observation to the observer process and verifies if it was logged correctly.

initialize_observer(setup_info, caller_info, x0, y0, seed)#

Starts the observer process and sends the setup information.

finish()#

Closes the observer process.

__getattr__(__name)#

Retrieves the attribute of the underlying observer.

__init__(observer_name: Optional[str] = None, **kwargs_for_observer)#

Initialize the ExternalObserver object.

Parameters
  • observer_name (str, optional) – The name of the observer. If not provided, the default observer will be used.

  • **kwargs_for_observer – Additional keyword arguments to be passed to the observer.

Methods

__init__([observer_name])

Initialize the ExternalObserver object.

finish()

Finish the external observer process.

initialize_observer(setup_info, caller_info, ...)

Initialize the observer.

observe(x, y[, context])

Observe the given data points.