geno_lewm.provenance.commitment¶
commitment
¶
Input commitments for scoring calls (RFC-0011 §3.2).
For every inference call the inputs are committed via:
input_commitment = SHA-256(canonical_serialize(
reference_window || edit_spec || pooling_config || dtype_config
))
Two runs with identical inputs produce identical commitments; any difference — even nominally-equivalent (different state layer, different pool radius, different dtype) — produces a distinct one.
PoolingConfig
dataclass
¶
State-encoder pooling configuration commit shape (RFC-0002).
DtypeConfig
dataclass
¶
Numerical-precision commit shape.
compute_input_commitment
¶
compute_input_commitment(reference_window: str, edit_spec: EditSpec, pooling_config: PoolingConfig, dtype_config: DtypeConfig) -> str
Return the "sha256:<hex>" input commitment for a scoring call.
The canonical payload is a dict with fixed keys; canonical-JSON encoding handles ordering and stability.