Commit 76fb0fb
fix(evaluation): skip invocations without user events to prevent ValidationError
EvaluationGenerator.convert_events_to_eval_invocations previously
initialized user_content as Content(parts=[]) for invocations without
user-authored events. While this is a valid Content object, creating
an Invocation with no meaningful user content is semantically incorrect
and can cause issues downstream in the evaluation pipeline.
This fix initializes user_content = None and skips the invocation if
no user event is found, emitting a debug log message for diagnostics.
Fixes #3760
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 4006fe4 commit 76fb0fb
1 file changed
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
627 | 627 | | |
628 | 628 | | |
629 | 629 | | |
630 | | - | |
| 630 | + | |
631 | 631 | | |
632 | 632 | | |
633 | 633 | | |
| |||
663 | 663 | | |
664 | 664 | | |
665 | 665 | | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
666 | 678 | | |
667 | 679 | | |
668 | 680 | | |
| |||
0 commit comments