Fix config override bug by recreating LMs after load_state

This commit is contained in:
2026-01-24 01:08:08 -08:00
parent 2e671bd27f
commit a234b48cda

View File

@@ -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)
# recreate LMs from config (not from saved state)
self.reload_lms()
if __name__ == "__main__":