rcognita.callbacks.ObjectiveCallback

class rcognita.callbacks.ObjectiveCallback(logger, log_level='info')

A Callback class that logs the current objective value of an Actor instance.

This callback is triggered whenever the Actor.objective method is called.

Attributes: log (function): A logger function with the specified log level.

__init__(logger, log_level='info')

Initialize a callback object.

Parameters
  • logger (logging.Logger) – A logging object that will be used to log messages.

  • log_level (str) – The level at which messages should be logged.

Methods

__init__(logger[, log_level])

Initialize a callback object.

perform(obj, method, output)