Skip to content

symfonic.capabilities.memory.phases.deep_native_graph_strengthen

deep_native_graph_strengthen

Bounded native DEEP recurrence strengthening with an importance CAS port.

NativeStrengthenPhase

NativeStrengthenPhase(graph: JournalledGraph, owner: DeepTenantOwner, port: NativeGraphMutationPort, *, spreading_weight: float = 0.5)

Boost a recurring native row once per bounded DEEP sweep.

Source code in src/symfonic/capabilities/memory/phases/deep_native_graph_strengthen.py
def __init__(self, graph: JournalledGraph, owner: DeepTenantOwner,
             port: NativeGraphMutationPort, *, spreading_weight: float = 0.5) -> None:
    require_graph(graph, owner)
    if type(port) is NativeGraphMutationPort or not isinstance(port, NativeGraphMutationPort):
        raise MemoryContractError("native DEEP requires an implemented importance CAS port")
    if not 0 <= spreading_weight <= 1:
        raise ValueError("spreading_weight must be between zero and one")
    self.graph, self.owner, self.port = graph, owner, port
    self.spreading_weight = spreading_weight