Skip to content

EvaluationHarness

junjo.evaluation.EvaluationHarness

Kind: Class

SDK version: 0.67.0

Documentation channel: Stable release

EvaluationHarness(*, application_key: str, service_identity: ExecutionServiceIdentity, targets: tuple[EvaluationTarget, ...], evaluators: tuple[Evaluator, ...], runtime_context: Callable[[], AbstractAsyncContextManager[ResourcesT]])

View source

One explicit application declaration consumed by the SDK runner.

Name Type Description Default
application_key str Stable key matching Studio Datasets for this app.
service_identity ExecutionServiceIdentity The application’s real OpenTelemetry service
namespace and name. Evaluation does not replace this identity.
targets tuple[EvaluationTarget, ...] Explicit Node, Workflow, and Agent declarations.
evaluators tuple[Evaluator, ...] Explicit built-in or application callback evaluators.
runtime_context Callable[[], AbstractAsyncContextManager[ResourcesT]] Application-owned asynchronous context for
process-lifetime telemetry, provider clients, and execution resources.
It is acquired lazily by an evaluation executor.

runtime() -> AsyncIterator[ResourcesT]

View source

Enter one application-owned evaluation-host runtime.

Target discovery and schema listing never enter this context. An EvaluationExecutor enters it lazily before the first real target execution, reuses the yielded providers, clients, and telemetry runtime across operations, and closes it when the executor exits.

target_descriptors() -> tuple[TargetDescriptor, ...]

View source

Return registered targets in deterministic display order.

evaluator_descriptors() -> tuple[EvaluatorDescriptor, ...]

View source

Return registered evaluators in deterministic display order.

prepare_case(case: CaseRead) -> PreparedEvaluation

View source

Resolve and validate one immutable Studio case before provider work.