Repository navigation
Show and Tell: Zero-Daemon Crash Recovery for Long-Running DSPy Optimizers (MIPROv2 / Teleprompters) #10394
sdageltc
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem: Costly Crashes in Long Teleprompter Compilations
When optimizing DSPy programs with search-heavy teleprompters (such as
BootstrapFewShotWithRandomSearch,MIPROv2, or multi-candidate Bayesian signature search), runs often span hundreds of candidate evaluations over several hours.If the process crashes at trial 47/50 due to a spot instance interruption, network timeout, or rate-limit error:
Solution: Zero-Daemon Step-Level Checkpointing (LetItLoop)
We built an open-source, zero-daemon in-process durability library called LetItLoop (GitHub).
By wrapping candidate evaluation steps with
@durableandstep(), each candidate prompt, program score, and validation result is written to an atomic, CRC32-checksummed Write-Ahead Log (WAL) on disk.When restarting after a crash:
Minimal Example: Durable Optimizer Loop
Reference Implementation
We published a complete cookbook with mock teleprompters and automated crash-recovery tests:
examples/cookbooks/dspy_durable_optimize.pyCurious how others in the DSPy community are persisting long teleprompter search states and handling spot instance restarts during prompt compilations!
All reactions