From a234b48cdaeb59995b05c5e53a5a928b5f97f929 Mon Sep 17 00:00:00 2001 From: Farouk Adeleke Date: Sat, 24 Jan 2026 01:08:08 -0800 Subject: [PATCH] Fix config override bug by recreating LMs after load_state --- nanocode.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nanocode.py b/nanocode.py index c1d6018..be4ebc0 100644 --- a/nanocode.py +++ b/nanocode.py @@ -277,10 +277,11 @@ class RLMCodingProgram(PrecompiledProgram): PrecompiledProgram.from_precompiled() calls load_state() AFTER __init__, which overwrites our LMs with saved state. We fix this by recreating - the LMs from self.config after the parent load_state runs. + the LMs from self.config after the parent load_state runs. Modaic will + fix this in a later patch for future devs. """ - super().load_state(state) - # Recreate LMs from config (not from saved state) + super().load_state(state) + # recreate LMs from config (not from saved state) self.reload_lms() if __name__ == "__main__":