dspy icon indicating copy to clipboard operation
dspy copied to clipboard

Fix signature saving at Predict saving

Open chenmoneygithub opened this issue 4 months ago • 0 comments

resolve #1045

Change summary:

  • Add a dump_state/load_state pair to Signature class for better modularization.
  • Remove the save_verbose option, as it doesn't make sense to change input fields to output fields at loading time. As we are doing "weights-only" saving, the signatures' architecture should match, i.e., input fields and output fields' number and name. Only changeable attributes should be included with saving.
  • Save prefix for every field as requested in #1045.
  • Added unit testing.

chenmoneygithub avatar Sep 28 '24 01:09 chenmoneygithub