dspy
dspy copied to clipboard
Fix signature saving at Predict saving
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.