dspy/gepa-track-best-outputs-without-stats
| Pack | Severity | Fix | Versions |
|---|---|---|---|
| DSPy | error | none, edit by hand | All versions |
dspy.GEPA(..., track_best_outputs=True) asserts that track_stats is True, and track_stats defaults to False.
optimizer = dspy.GEPA(metric=feedback_metric, auto="light", track_best_outputs=True)optimizer = dspy.GEPA(metric=feedback_metric, auto="light", track_stats=True, track_best_outputs=True)What the rule reports
Section titled “What the rule reports”Calls to GEPA(...) that set track_best_outputs=True without setting track_stats=True.
How to fix it
Section titled “How to fix it”Pass track_stats=True alongside track_best_outputs=True, or remove track_best_outputs=True.
Diagnostic message
Section titled “Diagnostic message”dspy.GEPA(track_best_outputs=True) requires track_stats=True and raises AssertionError when track_stats is omitted or False.See all rules in the DSPy pack.