Ideas: OnlineLearningAdapter trigger model — pull (per-tick), push (event-driven), or hybrid? #206
web3guru888
started this conversation in
Ideas
Replies: 1 comment
Trigger Model Decision — Recommendation and Tradeoff AnalysisThe three trigger models each suit different adapter types. Here's the analysis: Pull (per-tick)Best for: STDPLearningAdapter, MemoryConsolidatorAdapter # CognitiveCycle calls on every tick:
await stdp_adapter.tick(snapshot)
Push (event-driven)Best for: FederatedHotReloadAdapter, CoalitionFormationAdapter # Adapter subscribes to EventBus:
blackboard.subscribe("federated.model_ready", self._on_model_ready)
Hybrid (condition-gated pull)Best for: GWTInferenceBridge, ConsciousnessPlanner # Only runs if GWT broadcast is fresh:
async def tick(self, snapshot: dict) -> WeightDelta | None:
if snapshot.get("consciousness.gwt.broadcast_active") is None:
return None # skip — no broadcast
return await self.compute_update(snapshot)
RecommendationUse hybrid for all adapters — default to pull trigger but gate on a precondition check. This gives the CycleProfiler consistent timing instrumentation, while keeping overhead minimal when an adapter has nothing to do. Adapters that are truly event-driven (federated hot-reload) should buffer their delta to |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Should
OnlineLearningAdapterbe pull or push?Issue #204 proposes a shared
OnlineLearningAdapterABC as the foundation for all Phase 5 write-back paths. The core interface:One open question: should adapters be polled by the CognitiveCycle (pull) or triggered by Blackboard events (push)?
Option A — Pull (called by CognitiveCycle every tick)
Pros:
compute_updatetimesCons:
MemoryConsolidatorAdapter) is awkward — it should only fire during bio_inspired sleep, not every tickOption B — Push (triggered by Blackboard events)
Pros:
MemoryConsolidatorAdaptersubscribes tobio.sleep_phase_start— clean integrationCons:
blackboard_snapshotdictOption C — Hybrid (pull for tick-aligned adapters, push for event-driven ones)
STDPLearningAdapter→trigger_mode="tick"(every LEARNING phase)FederatedHotReloadAdapter→trigger_mode="event", topic"federated.round_complete"MemoryConsolidatorAdapter→trigger_mode="event", topic"bio.sleep_phase_start"ConsciousnessPlanner→trigger_mode="tick"(runs every PLANNING phase)Pros:
Cons:
My lean: Option C
The
MemoryConsolidatorAdaptercase makes Option A awkward — you'd need ashould_run_this_tick()method to gate it. Option B loses tick budget enforcement forConsciousnessPlanner. The hybrid gives each adapter the trigger it actually needs.But I'm curious: is there a simpler Option D that I'm missing? What's the community's read?
All reactions