cayu.storage
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.
SQLiteEvalStore
Section titled “SQLiteEvalStore”from cayu import SQLiteEvalStoreRestart-durable embedded eval persistence for a single SQLite database.
Bases: EvalStore.
close (method)
Section titled “close (method)”async SQLiteEvalStore.close() -> Nonesave_corpus (method)
Section titled “save_corpus (method)”async SQLiteEvalStore.save_corpus(corpus: EvalCorpusDocument, *, redact_json: Callable[[Any], Any]) -> EvalCorpusCatalogEntryload_corpus (method)
Section titled “load_corpus (method)”async SQLiteEvalStore.load_corpus(revision: str, *, max_bytes: int=EVAL_CORPUS_MAX_BYTES) -> EvalCorpusDocument | Nonelist_corpora (method)
Section titled “list_corpora (method)”async SQLiteEvalStore.list_corpora(query: EvalCatalogQuery | None=None) -> EvalCorpusCatalogPagesave_scenario (method)
Section titled “save_scenario (method)”async SQLiteEvalStore.save_scenario(scenario: EvalScenarioDocumentV2, *, redact_json: Callable[[Any], Any]) -> EvalScenarioCatalogEntryload_scenario (method)
Section titled “load_scenario (method)”async SQLiteEvalStore.load_scenario(revision: str, *, max_bytes: int=EVAL_SCENARIO_MAX_BYTES) -> EvalScenarioDocumentV2 | Nonelist_scenarios (method)
Section titled “list_scenarios (method)”async SQLiteEvalStore.list_scenarios(query: EvalScenarioCatalogQuery | None=None) -> EvalScenarioCatalogPagesave_authored_suite (method)
Section titled “save_authored_suite (method)”async SQLiteEvalStore.save_authored_suite(document: EvalSuiteDocument, *, redact_json: Callable[[Any], Any]) -> EvalAuthoredSuiteCatalogEntryload_authored_suite (method)
Section titled “load_authored_suite (method)”async SQLiteEvalStore.load_authored_suite(revision: str, *, max_bytes: int=EVAL_SUITE_AUTHORING_MAX_BYTES) -> EvalSuiteDocument | Nonelist_authored_suites (method)
Section titled “list_authored_suites (method)”async SQLiteEvalStore.list_authored_suites(query: EvalAuthoredSuiteCatalogQuery | None=None) -> EvalAuthoredSuiteCatalogPagesave_judge_calibration (method)
Section titled “save_judge_calibration (method)”async SQLiteEvalStore.save_judge_calibration(report: EvalJudgeCalibrationReportV1, *, redact_json: Callable[[Any], Any]) -> EvalJudgeCalibrationReportV1load_judge_calibration (method)
Section titled “load_judge_calibration (method)”async SQLiteEvalStore.load_judge_calibration(revision: str, *, max_bytes: int=EVAL_JUDGE_CALIBRATION_MAX_BYTES) -> EvalJudgeCalibrationReportV1 | Noneload_judge_calibration_by_run_id (method)
Section titled “load_judge_calibration_by_run_id (method)”async SQLiteEvalStore.load_judge_calibration_by_run_id(run_id: str, *, max_bytes: int=EVAL_JUDGE_CALIBRATION_MAX_BYTES) -> EvalJudgeCalibrationReportV1 | Nonelist_suites (method)
Section titled “list_suites (method)”async SQLiteEvalStore.list_suites(query: EvalSuiteCatalogQuery) -> EvalSuiteCatalogPagelist_cases (method)
Section titled “list_cases (method)”async SQLiteEvalStore.list_cases(query: EvalCaseCatalogQuery) -> EvalCaseCatalogPageadmit_run (method)
Section titled “admit_run (method)”async SQLiteEvalStore.admit_run(request: EvalRunRequest, *, redact_json: Callable[[Any], Any]) -> EvalRunRecordload_run_by_idempotency_key (method)
Section titled “load_run_by_idempotency_key (method)”async SQLiteEvalStore.load_run_by_idempotency_key(idempotency_key: str) -> EvalRunRecord | Noneload_run (method)
Section titled “load_run (method)”async SQLiteEvalStore.load_run(run_id: str) -> EvalRunRecord | Noneload_run_observation (method)
Section titled “load_run_observation (method)”async SQLiteEvalStore.load_run_observation(run_id: str) -> EvalRunObservation | Nonewait_for_run_terminal (method)
Section titled “wait_for_run_terminal (method)”async SQLiteEvalStore.wait_for_run_terminal(run_id: str, *, timeout_seconds: float=30.0, poll_interval_seconds: float=EVAL_RUN_MIN_OBSERVATION_INTERVAL_SECONDS, max_poll_interval_seconds: float=EVAL_RUN_MAX_OBSERVATION_INTERVAL_SECONDS) -> EvalRunObservation | NoneWait within a strict deadline for a terminal run observation.
Polling begins no faster than the public 50 ms floor and exponentially backs
off to the caller’s bounded ceiling. A missing run returns None; deadline
exhaustion raises TimeoutError.
list_runs (method)
Section titled “list_runs (method)”async SQLiteEvalStore.list_runs(query: EvalRunQuery | None=None) -> EvalRunPageclaim_run (method)
Section titled “claim_run (method)”async SQLiteEvalStore.claim_run(*, target_key: str | None=None, launch_revision: str | None=None, lease_seconds: int=300) -> EvalRunLease | Noneclaim_run_for_targets (method)
Section titled “claim_run_for_targets (method)”async SQLiteEvalStore.claim_run_for_targets(target_keys: tuple[str, ...], *, lease_seconds: int=300) -> EvalRunLease | Noneheartbeat_run (method)
Section titled “heartbeat_run (method)”async SQLiteEvalStore.heartbeat_run(claim: EvalRunClaim, *, extend_seconds: int=300) -> EvalRunRecordheartbeat_run_observation (method)
Section titled “heartbeat_run_observation (method)”async SQLiteEvalStore.heartbeat_run_observation(claim: EvalRunClaim, *, extend_seconds: int=300) -> EvalRunObservationrequest_cancel (method)
Section titled “request_cancel (method)”async SQLiteEvalStore.request_cancel(run_id: str) -> EvalRunRecordinitialize_scenario_progress (method)
Section titled “initialize_scenario_progress (method)”async SQLiteEvalStore.initialize_scenario_progress(claim: EvalRunClaim, progress: EvalScenarioRunProgress) -> EvalRunRecordupdate_scenario_trial (method)
Section titled “update_scenario_trial (method)”async SQLiteEvalStore.update_scenario_trial(claim: EvalRunClaim, trial: EvalScenarioTrialProgress) -> EvalRunRecordload_trial_checkpoints (method)
Section titled “load_trial_checkpoints (method)”async SQLiteEvalStore.load_trial_checkpoints(claim: EvalRunClaim) -> tuple[EvalRunTrialCheckpoint, ...]load_trial_evidence_links (method)
Section titled “load_trial_evidence_links (method)”async SQLiteEvalStore.load_trial_evidence_links(run_id: str) -> tuple[EvalTrialEvidenceLinkV1, ...]save_trial_checkpoint (method)
Section titled “save_trial_checkpoint (method)”async SQLiteEvalStore.save_trial_checkpoint(claim: EvalRunClaim, checkpoint: EvalRunTrialCheckpoint, *, redact_json: Callable[[Any], Any]) -> Nonesubmit_scenario_approval (method)
Section titled “submit_scenario_approval (method)”async SQLiteEvalStore.submit_scenario_approval(run_id: str, submission: EvalScenarioApprovalSubmission) -> EvalRunRecordpublish_result (method)
Section titled “publish_result (method)”async SQLiteEvalStore.publish_result(claim: EvalRunClaim, result: CorpusExecutionResult, *, redact_json: Callable[[Any], Any]) -> EvalRunRecordfail_run (method)
Section titled “fail_run (method)”async SQLiteEvalStore.fail_run(claim: EvalRunClaim, code: EvalRunFailureCode, *, diagnostic: EvalRunFailureDiagnostic | None=None) -> EvalRunRecordfinish_cancel (method)
Section titled “finish_cancel (method)”async SQLiteEvalStore.finish_cancel(claim: EvalRunClaim) -> EvalRunRecordrelease_run (method)
Section titled “release_run (method)”async SQLiteEvalStore.release_run(claim: EvalRunClaim) -> EvalRunRecordload_result (method)
Section titled “load_result (method)”async SQLiteEvalStore.load_result(run_id: str, *, max_bytes: int=CORPUS_EXECUTION_RESULT_MAX_BYTES) -> CorpusExecutionResult | Nonesave_captured_result (method)
Section titled “save_captured_result (method)”async SQLiteEvalStore.save_captured_result(corpus: EvalCorpusDocument, result: CapturedEvaluationResultV1, *, redact_json: Callable[[Any], Any]) -> EvalResultRecordload_result_by_revision (method)
Section titled “load_result_by_revision (method)”async SQLiteEvalStore.load_result_by_revision(revision: str, *, max_bytes: int=CORPUS_EXECUTION_RESULT_MAX_BYTES) -> CorpusExecutionResult | CapturedEvaluationResultV1 | Noneload_result_record (method)
Section titled “load_result_record (method)”async SQLiteEvalStore.load_result_record(revision: str) -> EvalResultRecord | Nonelist_results (method)
Section titled “list_results (method)”async SQLiteEvalStore.list_results(query: EvalResultQuery) -> EvalResultPageset_baseline (method)
Section titled “set_baseline (method)”async SQLiteEvalStore.set_baseline(update: EvalBaselineUpdate, *, redact_json: Callable[[Any], Any]) -> EvalBaselineMutationRecordload_baseline (method)
Section titled “load_baseline (method)”async SQLiteEvalStore.load_baseline(key: EvalBaselineKey) -> EvalBaselineRecord | Noneload_baseline_mutation (method)
Section titled “load_baseline_mutation (method)”async SQLiteEvalStore.load_baseline_mutation(operation_id: str) -> EvalBaselineMutationRecord | Noneinit (method)
Section titled “init (method)”SQLiteEvalStore.__init__(path: str | Path, *, schema_mode: schema.SchemaMode=schema.SchemaMode.CREATE, read_only: bool=False, writer_contention_policy: SQLiteEvalWriterContentionPolicy=DEFAULT_SQLITE_EVAL_WRITER_CONTENTION_POLICY) -> NoneRelease source · Runtime guarantees · Capability guides
SQLiteEvalWriterContentionPolicy
Section titled “SQLiteEvalWriterContentionPolicy”from cayu import SQLiteEvalWriterContentionPolicyBounded SQLite lock acquisition and retry policy for paid-effect evidence.
Decorators: @dataclass(frozen=True, slots=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 |
|---|---|---|
max_wait_seconds |
float |
60.0 |
lock_attempt_seconds |
float |
0.25 |
initial_backoff_seconds |
float |
0.01 |
max_backoff_seconds |
float |
0.25 |