cayu.evals.benchmark_package
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.
benchmark_package_from_json
Section titled “benchmark_package_from_json”from cayu.evals import benchmark_package_from_jsonbenchmark_package_from_json(source: str) -> BenchmarkPackageV1Release source · Runtime guarantees · Capability guides
benchmark_package_scenarios
Section titled “benchmark_package_scenarios”from cayu.evals import benchmark_package_scenariosResolve scenarios with the same package provenance as their authored cases.
benchmark_package_scenarios(package: BenchmarkPackageV1) -> tuple[EvalScenarioDocumentV2, ...]Release source · Runtime guarantees · Capability guides
benchmark_package_to_json
Section titled “benchmark_package_to_json”from cayu.evals import benchmark_package_to_jsonbenchmark_package_to_json(package: BenchmarkPackageV1) -> strRelease source · Runtime guarantees · Capability guides
benchmark_suite_selection
Section titled “benchmark_suite_selection”from cayu.evals import benchmark_suite_selectionBind package identity into the existing comparable case and cohort identities.
benchmark_suite_selection(package: BenchmarkPackageV1, case_ids: Sequence[str] | None=None) -> tuple[EvalSuiteDocumentV3, EvalSuiteSelectionV1]Release source · Runtime guarantees · Capability guides
BenchmarkFileV1
Section titled “BenchmarkFileV1”from cayu.evals import BenchmarkFileV1A package-relative source for one existing immutable scenario requirement.
Bases: _PortableModel.
Fields and attributes
Section titled “Fields and attributes”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 |
|---|---|---|
scenario_revision |
StrictStr |
required |
requirement_id |
StrictStr |
required |
path |
StrictStr |
required |
validate_revision (method)
Section titled “validate_revision (method)”BenchmarkFileV1.validate_revision(value: str, info) -> strvalidate_id (method)
Section titled “validate_id (method)”BenchmarkFileV1.validate_id(value: str, info) -> strvalidate_path (method)
Section titled “validate_path (method)”BenchmarkFileV1.validate_path(value: str) -> strRelease source · Runtime guarantees · Capability guides
BenchmarkPackageV1
Section titled “BenchmarkPackageV1”from cayu.evals import BenchmarkPackageV1A versioned benchmark over the canonical authored-suite/case contracts.
Bases: _PortableModel.
Fields and attributes
Section titled “Fields and attributes”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 |
revision |
StrictStr |
required |
id |
StrictStr |
required |
version |
StrictStr |
required |
scorer_id |
StrictStr |
required |
scorer_version |
StrictStr |
required |
suite |
EvalSuiteDocumentV3 |
required |
scenarios |
tuple[EvalScenarioDocumentV2, ...] |
Field(default=(), max_length=1000) |
files |
tuple[BenchmarkFileV1, ...] |
Field(default=(), max_length=1000) |
requirements |
BenchmarkRequirementsV1 |
Field(default_factory=BenchmarkRequirementsV1) |
validate_schema_version (method)
Section titled “validate_schema_version (method)”BenchmarkPackageV1.validate_schema_version(value: object) -> objectvalidate_revision (method)
Section titled “validate_revision (method)”BenchmarkPackageV1.validate_revision(value: str, info) -> strvalidate_ids (method)
Section titled “validate_ids (method)”BenchmarkPackageV1.validate_ids(value: str, info) -> strvalidate_versions (method)
Section titled “validate_versions (method)”BenchmarkPackageV1.validate_versions(value: str, info) -> strvalidate_order (method)
Section titled “validate_order (method)”BenchmarkPackageV1.validate_order(value: object, info) -> objectvalidate_contract (method)
Section titled “validate_contract (method)”BenchmarkPackageV1.validate_contract() -> BenchmarkPackageV1create (method)
Section titled “create (method)”BenchmarkPackageV1.create(*, id: str, version: str, scorer_id: str, scorer_version: str, suite: EvalSuiteDocumentV3, scenarios: Sequence[EvalScenarioDocumentV2]=(), files: Sequence[BenchmarkFileV1]=(), requirements: BenchmarkRequirementsV1 | None=None) -> BenchmarkPackageV1Release source · Runtime guarantees · Capability guides
BenchmarkRequirementsV1
Section titled “BenchmarkRequirementsV1”from cayu.evals import BenchmarkRequirementsV1Names which must already exist on the explicitly selected trusted target.
Bases: _PortableModel.
Fields and attributes
Section titled “Fields and attributes”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 |
|---|---|---|
environments |
tuple[StrictStr, ...] |
Field(default=(), max_length=64) |
tools |
tuple[StrictStr, ...] |
Field(default=(), max_length=256) |
validate_order (method)
Section titled “validate_order (method)”BenchmarkRequirementsV1.validate_order(value: object, info) -> objectvalidate_names (method)
Section titled “validate_names (method)”BenchmarkRequirementsV1.validate_names(value: tuple[str, ...], info) -> tuple[str, ...]Release source · Runtime guarantees · Capability guides
load_benchmark_package
Section titled “load_benchmark_package”from cayu.evals import load_benchmark_packageRead a manifest (or directory/benchmark.json) and verify every named input file.
load_benchmark_package(path: str | Path) -> LoadedBenchmarkPackageRelease source · Runtime guarantees · Capability guides
LoadedBenchmarkPackage
Section titled “LoadedBenchmarkPackage”from cayu.evals import LoadedBenchmarkPackageDecorators: @dataclass(frozen=True).
Fields and attributes
Section titled “Fields and attributes”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 |
|---|---|---|
package |
BenchmarkPackageV1 |
required |
root |
Path |
required |
file_contents |
tuple[tuple[BenchmarkFileV1, bytes], ...] |
required |
manifest_path |
Path | None |
None |