Skip to content

cayu.evals.trial_policy

Public Cayu API. Definitions are grouped by their public source module, and definitions from private implementation modules appear on their package’s page; adding a symbol does not move existing links. The import shown at each entry is a supported public namespace. Read the Python API overview and install the required extra.

from cayu.evals import EVAL_SUITE_RUN_EXPOSURE_SCHEMA_VERSION
EVAL_SUITE_RUN_EXPOSURE_SCHEMA_VERSION = 1

Release source · Runtime guarantees · Capability guides

from cayu.evals import EVAL_SUITE_TRIAL_POLICY_SCHEMA_VERSION
EVAL_SUITE_TRIAL_POLICY_SCHEMA_VERSION = 1

Release source · Runtime guarantees · Capability guides

from cayu.evals import EvalCandidateCostBudgetV1

One configured per-trial observed-cost interruption threshold.

Bases: EvalMaximumCostTotalV1.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
currency StrictStr Field(min_length=1, max_length=16)
amount StrictStr Field(min_length=1, max_length=128)
EvalCandidateCostBudgetV1.validate_currency(value: str) -> str
EvalCandidateCostBudgetV1.validate_amount(value: str) -> str
EvalCandidateCostBudgetV1.from_decimal(*, currency: str, amount: Decimal) -> Self
EvalCandidateCostBudgetV1.validate_positive_budget() -> EvalCandidateCostBudgetV1

Release source · Runtime guarantees · Capability guides

from cayu.evals import EvalCaseReliabilityV1

Lossless bounded distribution and policy decision for one published case.

Bases: _PortablePolicyModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
schema_version Literal[1] 1
trial_policy_revision StrictStr required
outcome EvalReliabilityOutcome required
total_trials StrictInt Field(ge=1, le=EVAL_SUITE_MAX_TRIALS)
passed_trials StrictInt Field(ge=0, le=EVAL_SUITE_MAX_TRIALS)
candidate_failed_trials StrictInt Field(ge=0, le=EVAL_SUITE_MAX_TRIALS)
runtime_error_trials StrictInt Field(ge=0, le=EVAL_SUITE_MAX_TRIALS)
evaluator_error_trials StrictInt Field(ge=0, le=EVAL_SUITE_MAX_TRIALS)
unavailable_trials StrictInt Field(ge=0, le=EVAL_SUITE_MAX_TRIALS)
cancelled_trials StrictInt Field(ge=0, le=EVAL_SUITE_MAX_TRIALS)
scored_trials StrictInt Field(ge=0, le=EVAL_SUITE_MAX_TRIALS)
minimum_score StrictFloat | None Field(default=None, ge=0.0, le=1.0)
mean_score StrictFloat | None Field(default=None, ge=0.0, le=1.0)
maximum_score StrictFloat | None Field(default=None, ge=0.0, le=1.0)
variability EvalVariabilityKind required
EvalCaseReliabilityV1.validate_schema_version_type(value: object) -> object
EvalCaseReliabilityV1.validate_policy_revision(value: str, info) -> str
EvalCaseReliabilityV1.validate_distribution() -> EvalCaseReliabilityV1
EvalCaseReliabilityV1.create(*, policy: EvalSuiteTrialPolicyV1, trials: Iterable[tuple[str, float | None, EvalTrialDiagnosticCode]], uses_model_judge: bool) -> EvalCaseReliabilityV1

Release source · Runtime guarantees · Capability guides

from cayu.evals import EvalExecutionProfileExposureV1

One exact candidate profile bound to the cases it will execute.

Bases: _PortablePolicyModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
case_ids tuple[StrictStr, ...] Field(min_length=1, max_length=1000)
execution_profile_revision StrictStr required
execution_profile_comparison_revision StrictStr required
candidate_cost_budget EvalCandidateCostBudgetV1 | None None
EvalExecutionProfileExposureV1.validate_case_ids(value: tuple[str, ...]) -> tuple[str, ...]
EvalExecutionProfileExposureV1.validate_profile_revision(value: str, info) -> str

Release source · Runtime guarantees · Capability guides

from cayu.evals import EvalJudgeProfileExposureV1

One current judge route accepted for every assertion that names its key.

Bases: _PortablePolicyModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
profile_key StrictStr required
judge_profile_revision StrictStr required
judge_profile_comparison_revision StrictStr required
EvalJudgeProfileExposureV1.validate_profile_key(value: str) -> str
EvalJudgeProfileExposureV1.validate_profile_revision(value: str, info) -> str

Release source · Runtime guarantees · Capability guides

from cayu.evals import EvalMaximumCostExposureV1

Bases: _PortablePolicyModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
state Literal['priced', 'unavailable', 'not_applicable'] required
totals tuple[EvalMaximumCostTotalV1, ...] Field(default=(), max_length=16)
unavailable_reason EvalMaximumCostUnavailableReason | None None
pricing_profile_fingerprints tuple[StrictStr, ...] Field(default=(), max_length=64)
EvalMaximumCostExposureV1.validate_pricing_revisions(value: tuple[str, ...]) -> tuple[str, ...]
EvalMaximumCostExposureV1.validate_state() -> EvalMaximumCostExposureV1

Release source · Runtime guarantees · Capability guides

from cayu.evals import EvalMaximumCostTotalV1

Bases: _PortablePolicyModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
currency StrictStr Field(min_length=1, max_length=16)
amount StrictStr Field(min_length=1, max_length=128)
EvalMaximumCostTotalV1.validate_currency(value: str) -> str
EvalMaximumCostTotalV1.validate_amount(value: str) -> str
EvalMaximumCostTotalV1.from_decimal(*, currency: str, amount: Decimal) -> Self

Release source · Runtime guarantees · Capability guides

from cayu.evals import EvalMaximumCostUnavailableReason
EvalMaximumCostUnavailableReason = Literal['no_candidate_cost_ceiling', 'candidate_cost_not_hard_bounded', 'candidate_pricing_incomplete', 'judge_cost_not_hard_bounded', 'judge_pricing_incomplete']

Release source · Runtime guarantees · Capability guides

from cayu.evals import EvalSuiteRunExposureV1

Exact maximum configured work accepted for one authored-suite selection.

Bases: _PortablePolicyModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
schema_version Literal[1] EVAL_SUITE_RUN_EXPOSURE_SCHEMA_VERSION
revision StrictStr required
selection_revision StrictStr required
trial_policy_revision StrictStr required
execution_profiles tuple[EvalExecutionProfileExposureV1, ...] Field(min_length=1, max_length=1000)
judge_profiles tuple[EvalJudgeProfileExposureV1, ...] Field(default=(), max_length=64)
candidate_trials StrictInt Field(ge=1, le=100000)
judge_evaluations StrictInt Field(ge=0, le=6400000)
max_concurrency StrictInt Field(ge=1, le=EVAL_SUITE_MAX_CONCURRENCY)
maximum_candidate_model_steps StrictInt Field(ge=1)
maximum_candidate_total_tokens StrictInt | None Field(default=None, ge=1)
maximum_judge_input_tokens StrictInt | None Field(default=None, ge=0)
maximum_judge_output_tokens StrictInt | None Field(default=None, ge=0)
maximum_judge_total_tokens StrictInt | None Field(default=None, ge=0)
candidate_cost EvalMaximumCostExposureV1 required
judge_cost EvalMaximumCostExposureV1 required
EvalSuiteRunExposureV1.validate_schema_version_type(value: object) -> object
EvalSuiteRunExposureV1.validate_revisions(value: str, info) -> str
EvalSuiteRunExposureV1.validate_execution_profiles(value: tuple[EvalExecutionProfileExposureV1, ...]) -> tuple[EvalExecutionProfileExposureV1, ...]
EvalSuiteRunExposureV1.validate_judge_profiles(value: tuple[EvalJudgeProfileExposureV1, ...]) -> tuple[EvalJudgeProfileExposureV1, ...]
EvalSuiteRunExposureV1.validate_contract() -> EvalSuiteRunExposureV1
EvalSuiteRunExposureV1.comparison_revision() -> str

Return the cross-release identity of the accepted execution contract.

EvalSuiteRunExposureV1.create(**values: Any) -> EvalSuiteRunExposureV1

Release source · Runtime guarantees · Capability guides

from cayu.evals import EvalSuiteTrialPolicyV1

Immutable decision rule for the complete retained trial set of each case.

Bases: _PortablePolicyModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
schema_version Literal[1] EVAL_SUITE_TRIAL_POLICY_SCHEMA_VERSION
revision StrictStr required
trial_count StrictInt Field(ge=1, le=EVAL_SUITE_MAX_TRIALS)
minimum_passed_trials StrictInt Field(ge=1, le=EVAL_SUITE_MAX_TRIALS)
max_concurrency StrictInt Field(ge=1, le=EVAL_SUITE_MAX_CONCURRENCY)
require_zero_runtime_errors Literal[True] True
require_zero_evaluator_errors Literal[True] True
require_complete_required_evidence Literal[True] True
EvalSuiteTrialPolicyV1.validate_schema_version_type(value: object) -> object
EvalSuiteTrialPolicyV1.validate_required_flag_types(value: object, info) -> object
EvalSuiteTrialPolicyV1.validate_revision_shape(value: str, info) -> str
EvalSuiteTrialPolicyV1.validate_contract() -> EvalSuiteTrialPolicyV1
EvalSuiteTrialPolicyV1.create(*, trial_count: int=1, minimum_passed_trials: int | None=None, max_concurrency: int=1) -> EvalSuiteTrialPolicyV1

Release source · Runtime guarantees · Capability guides