Trace
autogen.beta.eval.trace.Trace #
Read-only view of one captured eval run.
Scorers receive a Trace through the trace parameter (resolved by name by the @scorer decorator). Use :meth:events_of to filter by event type, and :attr:tokens / :attr:duration_ms / :attr:exception for run-level signals.
Trace is constructed by the eval runner and has no equivalent inside autogen.beta itself — it is an eval-only view object.
Source code in autogen/beta/eval/trace.py
events_of #
Return events matching event_type (and optionally .name).
isinstance is used to test the type, so subclasses match too. When name is supplied, only events whose .name attribute equals it are returned — useful for tool events::
trace.events_of(ToolCallEvent, name="get_weather")
Events without a name attribute are excluded when name is set.
| RETURNS | DESCRIPTION |
|---|---|
tuple[_E, ...] | A tuple preserving original event order. |