mixle.experimental.typed_runtime.graph module¶
Compiled update graph and dependency-aware invalidation operations.
- class DependencyEdge(source_node, target_node, artifact=ArtifactKind.PARAMETERS, reason='child update invalidates parent computation')[source]
Bases:
objectA source-node artifact whose change invalidates a dependent target.
- class UpdateGraph(nodes, edges, root_node, compiler_version=1)[source]
Bases:
objectDirected acyclic graph of typed updates and invalidation dependencies.
Edges point from an updated source to a dependent computation. Consequently,
invalidated_by(node)walks forward from that node toward ancestors and any other consumers of shared state.- Parameters:
- node_at(path)[source]
Return the first node compiled at
path.- Parameters:
path (str)
- Return type:
UpdateNode
- dependents(node_id)[source]
Return direct computations invalidated by an update to
node_id.
- invalidated_by(node_id, *, include_self=True)[source]
Return the transitive invalidation closure in dependency order.
- topological_order()[source]
Return child-before-dependent order, raising on a dependency cycle.
- as_dict()[source]
Return a JSON-compatible graph without runtime object references.
- property compute_band
float32 only when every node’s subtree qualifies.
- Type:
Tree-level precision eligibility
- property convergence_certificate
the weakest node certificate (guarantees compose by minimum).
- Type:
Tree-level guarantee
- exception UpdateGraphError[source]
Bases:
ValueErrorRaised when a compiled update graph violates structural invariants.