Fix config override bug by recreating LMs after load_state
This commit is contained in:
@@ -231,6 +231,7 @@ class RLMCodingProgram(PrecompiledProgram):
|
|||||||
tools=self.tools,
|
tools=self.tools,
|
||||||
max_output_chars=self.config.max_output_chars,
|
max_output_chars=self.config.max_output_chars,
|
||||||
max_iterations=self.config.max_iters,
|
max_iterations=self.config.max_iters,
|
||||||
|
verbose=False, # We add our own verbose logging
|
||||||
)
|
)
|
||||||
self.agent.set_lm(self.lm)
|
self.agent.set_lm(self.lm)
|
||||||
|
|
||||||
@@ -357,9 +358,6 @@ class RLMCodingProgram(PrecompiledProgram):
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
agent = RLMCodingProgram(RLMCodingConfig())
|
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"]
|
branches = ["main", "dev", "prod"]
|
||||||
for branch in branches:
|
for branch in branches:
|
||||||
agent.push_to_hub(
|
agent.push_to_hub(
|
||||||
|
|||||||
Reference in New Issue
Block a user