geno_lewm.encoder.runtime_identity¶
runtime_identity
¶
Closed identity contract for a cache-building Carbon encoder runtime.
EncoderRuntimeIdentity
dataclass
¶
EncoderRuntimeIdentity(model_id: str, revision: str, state_contract_version: str, runtime_hash: str, weights_hash: str | None = None, schema_version: str = ENCODER_RUNTIME_IDENTITY_SCHEMA_VERSION)
Pinned model and byte identities required for cache construction.
cache_identity_hash
property
¶
Return the identity committed into cache keys for this state contract.
to_dict
¶
Return the canonical JSON-native contract payload.
Source code in geno_lewm/encoder/runtime_identity.py
parse_encoder_runtime_identity_bytes
¶
Parse one duplicate-key-free, closed runtime identity JSON object.
Source code in geno_lewm/encoder/runtime_identity.py
encoder_runtime_identity_from_mapping
¶
Validate a JSON-native mapping through the same closed parser.