RubyOld/debug.py
2025-04-08 19:52:01 -04:00

30 lines
781 B
Python

from datetime import datetime
class DebugMonitor:
def __init__(self):
self.last_dream = ""
self.last_thought = ""
self.last_loss = 0.0
self.last_context = ""
def log_dream(self, dream):
self.last_dream = dream
self._print("💤 Dream", dream)
def log_thought(self, thought):
self.last_thought = thought
self._print("💭 Thought", thought)
def log_loss(self, loss):
self.last_loss = loss
self._print("📉 Loss", f"{loss:.4f}")
def log_context(self, context):
self.last_context = context
self._print("📖 Context", context)
def _print(self, label, content):
now = datetime.now().strftime("%H:%M:%S")
print(f"[{now}] {label}: {content}")