Fix config override bug by recreating LMs after load_state

This commit is contained in:
2026-01-24 15:50:21 -08:00
parent 8af7fd829a
commit b92cf9f173

View File

@@ -170,8 +170,12 @@ def run_bash(cmd: str) -> str:
class RLMReasoningCallback(BaseCallback):
def on_module_end(self, call_id, outputs, exception):
if outputs and hasattr(outputs, "reasoning") and hasattr(outputs, "code"):
has_backticks = "```" in outputs.code
print(f"{DIM}⏺ [REASONING STEP]\n{outputs.reasoning}\n{RESET}")
print(f"{DIM}⏺ [CODE]\n```\n{outputs.code}\n```\n{RESET}")
if has_backticks:
print(f"{DIM}⏺ [CODE]\n{outputs.code}\n{RESET}")
else:
print(f"{DIM}⏺ [CODE]\n```\n{outputs.code}\n```\n{RESET}")
# -- Program ---