Closed wangyiav closed 1 month ago
More information, I verified no this issue on dspy-ai 2.5.5 In train.py, saving model json file (dspy-ai 2.5.10): optimized_cot = teleprompter.compile(****) optimized_cot.save(new_model_file)
In llm.py, loading model json file (dspy-ai 2.5.5): cot= xxxxWithAssertions().activate_assertions() cot.load(new_model_file)
Thank you @wangyiav ! Adding @chenmoneygithub
@wangyiav Thanks for reporting the issue! The error is because use_legacy_loading
gets accidentally passed to dspy.Retrieve
module. Let me fix it.
In train.py, saving model json file (dspy-ai 2.5.10): optimized_cot = teleprompter.compile(****) optimized_cot.save(new_model_file)
In llm.py, loading model json file (dspy-ai 2.5.10): cot= xxxxWithAssertions().activate_assertions() cot.load(new_model_file) Got exception here: e=Retrieve.load_state() got an unexpected keyword argument 'use_legacy_loading'