Normalized execution details for the evaluator behind a metric result.
Deterministic metrics usually record only status and duration. Model-backed evaluators can also attribute provider, model, token usage, and cost without mixing that usage with the model output being evaluated.
Summary
Functions
Records a successfully completed evaluator.
Records an evaluator infrastructure failure.
Creates evaluator details and validates the lifecycle status.
Converts evaluator details to a JSON-compatible map, omitting absent values.
Records an evaluator that could not be resolved or used.
Adds measured duration when the evaluator did not provide its own timing.
Types
@type status() :: :completed | :error | :unavailable
@type t() :: %Aludel.Evals.Metric.Evaluator{ cost_usd: number() | nil, duration_ms: number() | nil, error: map() | nil, input_tokens: non_neg_integer() | nil, model: String.t() | nil, output_tokens: non_neg_integer() | nil, provider: String.t() | nil, status: status() }
Functions
Records a successfully completed evaluator.
Records an evaluator infrastructure failure.
Creates evaluator details and validates the lifecycle status.
Converts evaluator details to a JSON-compatible map, omitting absent values.
Adds measured duration when the evaluator did not provide its own timing.