[Bug] GEPA cannot save DSPy programs created from base modules like Predict and ChainOfThought
What happened?
Context:https://discord.com/channels/1161519468141355160/1161519642985111593/1423740373334888498
Steps to reproduce
N/A
DSPy version
3.0.4
@LakshyAAAgrawal I also replied to the discord thread, but for GEPA optimization saving checkpoint to a json file is a better choice than pickle.
I also have this problem. Trying to optimize a submodule of a program.
Edit: This helped work around:
GEPA(
track_best_outputs=False,
)
GEPA recently added support for cloudpickle, which should solve this issue. You can use it by `dspy.GEPA(..., gepa_kwargs={'use_cloudpickle': True}). Once this can be confirmed to work, I can enable it by default.
@chenmoneygithub, I am also happy to just use json based saving. One potential issue with that is the program class is still required, is that right?