mixle.experimental.typed_runtime.contracts module¶
Semantic contracts for the experimental statistically typed training runtime.
These types describe what an update means. They intentionally contain no execution code and do not import torch, distributed runtimes, or concrete model families. That makes a compiled plan inspectable before any model is sampled, scored, mutated, placed, or communicated.
- class ArtifactKind(*values)[source]
Bases:
StrEnumVersionable artifacts read or written by update nodes.
- class ComputeBand(*values)[source]
Bases:
StrEnumModel-side compute-precision eligibility of a node’s scoring subtree.
float32_eligiblemeans the subtree fuses AND every leaf family is in the validated reduced-precision set (mixle.inference.precision_plan.FP32_SAFE_FAMILIES) – the fused float32 kernel’s summed-log-likelihood error is verified < ~1e-6 relative there. The DATA-side conditions (bounded magnitude, non-degenerate variances) remain a runtime decision (optimize(precision="minimal")); this axis declares what the model structure permits. Composition is weakest-link: one ineligible node keeps the tree atfloat64.
- class ContractEvidenceKind(*values)[source]
Bases:
StrEnumProvenance class supporting a compiled update contract.
- class ConvergenceCertificate(*values)[source]
Bases:
StrEnumStrongest convergence-guarantee class attributable to a node’s update rule.
Guarantees compose by WEAKEST LINK: a tree’s certificate is the minimum over its nodes’ (see
weakest_certificate()). A frozen node is vacuously monotone – a preserved dependency cannot decline the objective.monotone_certified: exact / generalized-EM updates under the strict acceptance gate; the accepted-objective sequence is non-decreasing and (bounded above by the estimator variance floors) converges.robbins_monro_schedule: first-order updates whose per-round step schedule lies in the Robbins–Monro window (lr_decayin(0.5, 1]) – the step-size conditions stochastic-approximation EM analyses require for almost-sure convergence to stationary points.best_visited: stochastic/mutable updates with no schedule guarantee; the outer loop returns the best visited iterate.unknown: no attributable guarantee.
- property strength: int
Total order for weakest-link composition (higher is stronger).
- class ConsistencyRequirement(*values)[source]
Bases:
StrEnumStrongest distributed consistency mode known to preserve semantics.
- class CostEstimate(compute_units=0.0, wall_time_seconds=None, communication_bytes=0, peak_memory_bytes=0, source='structural_proxy', sample_count=0)[source]
Bases:
objectPlanning cost with provenance separating measured data from a proxy.
- Parameters:
- property measured: bool
Whether this estimate came from runtime observations.
- class CounterSemantics(*values)[source]
Bases:
StrEnumHow a numeric work field relates to earlier observations in the same run.
- class CurvatureKind(*values)[source]
Bases:
StrEnumCurvature information available to a geometry-aware optimizer.
- class MergeLaw(*values)[source]
Bases:
StrEnumAlgebra available for combining work from separate data/model shards.
- class ObjectiveKind(*values)[source]
Bases:
StrEnumObjective whose value gives an update its statistical meaning.
- class StateSemantics(*values)[source]
Bases:
StrEnumKinds of mutable or replay-relevant state touched by an update.
- class UpdateContract(objective_kind, update_kind, merge_law, state_semantics=<factory>, consistency=ConsistencyRequirement.STRICT_SYNCHRONOUS, curvature_kind=CurvatureKind.UNAVAILABLE, decomposition_axes=(), reads=<factory>, writes=<factory>, outer_objective_compatible=True, exact=True, convergence_certificate=ConvergenceCertificate.UNKNOWN, compute_band=ComputeBand.FLOAT64, declared_by='compiler_default', evidence_kind=ContractEvidenceKind.UNVERIFIED, evidence_id=None, notes=())[source]
Bases:
objectComplete semantic declaration for one independently schedulable node.
- Parameters:
objective_kind (ObjectiveKind)
update_kind (UpdateKind)
merge_law (MergeLaw)
state_semantics (frozenset[StateSemantics])
consistency (ConsistencyRequirement)
curvature_kind (CurvatureKind)
reads (frozenset[ArtifactKind])
writes (frozenset[ArtifactKind])
outer_objective_compatible (bool)
exact (bool)
convergence_certificate (ConvergenceCertificate)
compute_band (ComputeBand)
declared_by (str)
evidence_kind (ContractEvidenceKind)
evidence_id (str | None)
- property is_mutable: bool
Whether committing/rejecting this update requires state management.
- property shard_mergeable: bool
Whether independent shard payloads have a declared merge operation.