Skip to content

Fix/llm evaluator raise on failure serialization - #11552

Merged
sjrl merged 3 commits into
deepset-ai:mainfrom
GovindhKishore:fix/llm-evaluator-raise-on-failure-serialization
Jun 9, 2026
Merged

sjrl merged 3 commits into
deepset-ai:mainfrom
GovindhKishore:fix/llm-evaluator-raise-on-failure-serialization

Conversation

@GovindhKishore

Copy link
Copy Markdown
Contributor

Related Issues

Proposed Changes:

LLMEvaluator.to_dict was missing the raise_on_failure parameter. Because of this omission, saving and loading a pipeline silently reset raise_on_failure back to its default value (True).

I fixed this by explicitly adding raise_on_failure=self.raise_on_failure to the default_to_dict call inside the to_dict method of LLMEvaluator class.

How did you test it?

I updated the core unit tests to expect the serialized key and ran them successfully on Windows via PowerShell:
hatch run test:unit test/components/evaluators/test_llm_evaluator.py

Notes for the reviewer

The fix is a simple one-line addition to to_dict alongside matching assertions in the test file.

Checklist

@GovindhKishore
GovindhKishore requested a review from a team as a code owner June 8, 2026 17:17
@GovindhKishore
GovindhKishore requested review from sjrl and removed request for a team June 8, 2026 17:17
@vercel

vercel Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

@GovindhKishore is attempting to deploy a commit to the deepset Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant

CLAassistant commented Jun 8, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@sjrl sjrl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  haystack/components/evaluators
  llm_evaluator.py
Project Total  

This report was generated by python-coverage-comment-action

@sjrl
sjrl merged commit 42fa158 into deepset-ai:main Jun 9, 2026
20 of 22 checks passed
@GovindhKishore

Copy link
Copy Markdown
Contributor Author

@sjrl Thanks a lot for the merge.

@GovindhKishore
GovindhKishore deleted the fix/llm-evaluator-raise-on-failure-serialization branch June 9, 2026 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: raise_on_failure parameter omitted from LLMEvaluator.to_dict serialization

3 participants