medium severityDSPy optimizers (BootstrapFewShot, MIPROv2)

Optimization fails silently or errors (e.g., AttributeError on LM.copy); metric doesn't improve after trials; stuck on bootstrap phase; no demos generated despite trainset.

Root cause

Optimizers fail to generate sufficient high-quality demos if metric_threshold too high or trainset lacks diversity/volume, preventing iterative improvement. Env-specific hangs (threads/permission). Bugs in older versions (LM.copy missing).

DSPyteleprompterBootstrapFewShotMIPROv2AttributeErrormetric_thresholdoverfitting

Citations