Skip to content

trulens.core.utils.evaluator

trulens.core.utils.evaluator

Classes

Evaluator

Functions
enqueue_conversation
enqueue_conversation(
    conversation_id: str, record_ids: List[str]
) -> None

Queue one context-bounded conversation evaluation.

get_last_error
get_last_error() -> Optional[BaseException]

Return the most recent exception observed by the evaluator thread, or None if no error has occurred.

start_evaluator
start_evaluator() -> None

Start the evaluator for the app.

stop_evaluator
stop_evaluator() -> None

Stop the evaluator for the app.

This is only supported for OTEL Tracing.

compute_now
compute_now(
    record_ids: Optional[List[str]],
    lock: Optional[Lock] = None,
) -> None

Trigger immediate computation.

PARAMETER DESCRIPTION
record_ids

Optional list of record ids to compute feedbacks for. If None, computes feedbacks for all unprocessed records.

TYPE: Optional[List[str]]

lock

Optional lock to use for the computation. If None, will use the default lock.

TYPE: Optional[Lock] DEFAULT: None

compute_conversation_now
compute_conversation_now(record_ids: List[str]) -> None

Compute conversation metrics for one exact recording batch.