Skip to content

add check to warn if metric_fn does not have a feedback string#8

Open
banana-bison wants to merge 1 commit into
swe-productivity:mainfrom
banana-bison:metric_feedback
Open

add check to warn if metric_fn does not have a feedback string#8
banana-bison wants to merge 1 commit into
swe-productivity:mainfrom
banana-bison:metric_feedback

Conversation

@banana-bison
Copy link
Copy Markdown

@banana-bison banana-bison commented Dec 18, 2025

Fixes: #6

Signed-off-by: banana-bison <bananabison@gmail.com>
Comment thread dspy/evaluate/evaluate.py
def process_item(example):
prediction = program(**example.inputs())
score = metric(example, prediction)
score_attr = getattr(score, "_store")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we first check if the score is dspy.Prediction?


rng = random.Random(self.seed)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change intentional?

pred_name,
trace_for_pred,
)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

]
optimized_program = optimizer.compile(student, trainset=trainset, valset=trainset)

print(caplog.messages)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] GEPA should issue a warning if the user metric doesn't return a feedback text

2 participants