Fix config override bug by recreating LMs after load_state

This commit is contained in:
2026-01-24 14:57:51 -08:00
parent 68c4115454
commit d782fdeddf

View File

@@ -231,6 +231,7 @@ class RLMCodingProgram(PrecompiledProgram):
tools=self.tools,
max_output_chars=self.config.max_output_chars,
max_iterations=self.config.max_iters,
verbose=False, # We add our own verbose logging
)
self.agent.set_lm(self.lm)
@@ -357,9 +358,6 @@ class RLMCodingProgram(PrecompiledProgram):
if __name__ == "__main__":
agent = RLMCodingProgram(RLMCodingConfig())
#displayed = agent(
# task="Use only the command `print(llm_query('Who is the CEO of Apple?'))` to find the answer."
#)
branches = ["main", "dev", "prod"]
for branch in branches:
agent.push_to_hub(