From 2cd72863208e0005009a8afcb8ee7fb4efee7d8f Mon Sep 17 00:00:00 2001 From: Farouk Adeleke Date: Sat, 24 Jan 2026 00:41:45 -0800 Subject: [PATCH] Add reload_lms method and debug forward() --- nanocode.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nanocode.py b/nanocode.py index 9f79ed6..1227e8c 100644 --- a/nanocode.py +++ b/nanocode.py @@ -223,13 +223,13 @@ class RLMCodingProgram(PrecompiledProgram): self.agent.set_lm(self.lm) self.set_lm(self.lm) print(f"{BLUE}CONFIG WAS SET: {self.config}{RESET}") - print(f"{BLUE}LM WAS SET: {self.agent.get_lm().model}{RESET}") + print(f"{BLUE}LM WAS SET: {self.agent.get_lm()}{RESET}") print(f"{BLUE}SUB LM WAS SET: {self.agent.sub_lm.model}{RESET}") def forward(self, task: str) -> str: if not task: return dspy.Prediction(answer="No Task Given.") - + print(f"{YELLOW}DEBUG forward() - agent.get_lm(): {self.agent.get_lm()}{RESET}") print(f"{YELLOW}DEBUG forward() - self.lm.model: {self.lm.model}{RESET}") print(f"{YELLOW}DEBUG forward() - agent.sub_lm.model: {self.agent.sub_lm.model}{RESET}")