Skip to content

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)

Calls to GEPA(...) that set track_best_outputs=True without setting track_stats=True.

Pass track_stats=True alongside track_best_outputs=True, or remove track_best_outputs=True.

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.