Skip to content

armgit / dspy

Public Imported from GitHub
0

DSPy: The framework for programming—not prompting—language models

Python

fix predict

chenmoneygithub557e126c14df
diff --git a/dspy/predict/predict.py b/dspy/predict/predict.py
index c90419ad0..ead7cae1f 100644
--- a/dspy/predict/predict.py
+++ b/dspy/predict/predict.py
@@ -64,7 +64,7 @@ class Predict(Module, Parameter):
if name not in excluded_keys:
setattr(self, name, value)
- self.signature.load_state(state["signature"])
+ self.signature = self.signature.load_state(state["signature"])
if "extended_signature" in state:
self.extended_signature.load_state(state["extended_signature"])