Skip to content

EvaluationContext

junjo.evaluation.EvaluationContext

Kind: Class

SDK version: 0.67.0

Documentation channel: Stable release

EvaluationContext(run_class: EvaluationRunClass, dataset_id: str, source_revision: str, role: EvaluationRole = EvaluationRole.ORCHESTRATOR, run_id: str | None = None, case_id: str | None = None, case_key: str | None = None, attempt_id: str | None = None, version: int = EVALUATION_CONTEXT_VERSION)

View source

Immutable identities for one evaluation or generated-case execution.

Ordinary application execution does not need an EvaluationContext. Its absence is the compact representation of normal application traffic.

Name Type Description Default
run_class EvaluationRunClass Evaluation or dataset-generation classification.
dataset_id str Canonical Studio Dataset ID.
source_revision str Clean committed application source revision.
role EvaluationRole Role of the span or callback receiving this context. EvaluationRole.ORCHESTRATOR
run_id str | None Canonical Studio Run ID for an evaluation Attempt. None
case_id str | None Canonical Studio Case ID for an evaluation Attempt. None
case_key str | None Requested Case key before a generated Case exists. None
attempt_id str | None Canonical Studio Attempt ID for an evaluation Attempt. None

for_role(role: EvaluationRole) -> EvaluationContext

View source

Return a copy for one subject, judge, or verifier boundary.

attributes() -> dict[str, str | int]

View source

Return the exact bounded attributes governed by ADR 0014.