Skip to content

Framework evaluation

Package Value
Distribution archetype-ecs
Import package archetype

Extension API. Grade frames and persist generic evaluation outcomes and receipts owned by archetype-ecs.

FrameGrader

Grade one lazy subject frame, synchronously or asynchronously.

Outcome dataclass

Outcome(status, score=None, evidence=dict())

Represent a validated grading conclusion.

status must be pass, fail, invalid, or inconclusive. A supplied score must be finite.

Field Type Default
status str required
score float \| None None
evidence dict generated by dict

GraderContract dataclass

GraderContract(
    grader_id,
    implementation_version,
    config=dict(),
    thresholds=dict(),
    seed=None,
)

Identify the grader configuration used for a durable receipt.

Two receipts are directly comparable only when their contract digests match. Change implementation_version, configuration, thresholds, or seed whenever that comparison should no longer be valid.

digest

digest()

Return the byte-stable versioned grader identity.

Field Type Default
grader_id str required
implementation_version str required
config dict generated by dict
thresholds dict generated by dict
seed int \| None None

EvalReceipt

Persist the evidence produced by one evaluation.

Receipts are historical evidence rather than active simulation entities. They record what a grader concluded under a specific contract; callers decide what that conclusion means for policy or promotion.

Field Type Default
evaluation_id str ''
subject_digest str ''
contract_digest str ''
grader_id str ''
outcome str ''
score float \| None None
graded_at_ms int 0
evidence_json str '{}'