dspy
dspy copied to clipboard
fix(dspy): save and restore `dsp.settings.trace` in `backtrack_handler()`
This fixes the issue that originally, backtrack_handler()
clears dsp.settings.trace
, which is also used by optimizers such as BootstrapFewShot
.
Also some ruff linting of tests/predict/test_retry.py
.
Fixes #1356