Synchronous observational callbacks for GEPA optimization runs.
This module accepts both Elixir-native event names (:iteration_end) and the
upstream Python-style callback methods (on_iteration_end/1). Callback
entries may be functions, modules, or structs:
- two-arity function:
fn event_name, event -> ... end - one-arity function:
fn event -> ... end - module exporting
event_name/1oron_event_name/1 - struct whose module exports
event_name/2oron_event_name/2
Callback failures are logged and do not prevent later callbacks from receiving the same event, matching the upstream GEPA callback contract.
Summary
Functions
Return the upstream-style on_* method atom for an event name.
Notify each callback of an event.
Types
Functions
@spec method_name(event_name()) :: atom()
Return the upstream-style on_* method atom for an event name.
@spec notify([callback()] | callback() | nil, event_name(), event()) :: :ok
Notify each callback of an event.