Repository navigation
Commit 762a59c
feat(gooddata-eval): populate best_run_latency_s for agentic evaluators
ItemReport.best_run_latency_s has only ever been set on the single-shot path
(_run_one_item times each of its K attempts directly and keeps the best
one's own latency). The agentic path drives its K runs and best-of-K
selection inside each evaluator, so the runner never had a per-run latency
to read -- every agentic kind reported best_run_latency_s: null, which is
why tools consuming it (e.g. the Latency Explorer's tool-calls-vs-run-time
panel) have always been empty for agentic_*/vis_agentic.
Adds AgenticEvalOutcome.best_run_latency_s (and the matching bare annotation
on AgenticAssertionError/JudgeResponseError, same pattern already used for
timings) and wires it through all 11 agentic evaluators:
- general_question, metric_skill, dashboard_skill already track per-run
PhaseTimings; best_run_latency_s is derived from the rank-selected run's
own timings via the new run_latency_s() helper (excludes langfuse_s,
which is deliberately off the critical path).
- The other 8 (guardrail, search_tool, alert_skill, anomaly_detection,
kda_skill, visualization, what_if, conversation) had no per-run wall-clock
at all; each gets a new run_latency_s field on its per-run result,
measured the same way _run_one_item already does (time.monotonic()
bracketing the whole run).
agentic_runner.py copies it onto the ItemReport via a new
_apply_best_run_latency(), mirroring the existing _apply_timings().
Verified: full gooddata-eval suite (1382 tests), ruff lint/format, and ty
type-check all pass. Added focused tests for the new run_latency_s() helper,
_apply_best_run_latency()'s three paths (success/failure/absent), and
end-to-end value assertions for general_question and metric_skill (the two
kinds with fully deterministic mocked clocks).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 1daa2c4 commit 762a59c
19 files changed
Lines changed: 175 additions & 3 deletions
File tree
- packages/gooddata-eval
- src/gooddata_eval
- cli
- core
- agentic
- evaluators
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
343 | 355 | | |
344 | 356 | | |
345 | 357 | | |
| |||
425 | 437 | | |
426 | 438 | | |
427 | 439 | | |
| 440 | + | |
428 | 441 | | |
429 | 442 | | |
430 | 443 | | |
| |||
434 | 447 | | |
435 | 448 | | |
436 | 449 | | |
| 450 | + | |
437 | 451 | | |
438 | 452 | | |
439 | 453 | | |
| |||
448 | 462 | | |
449 | 463 | | |
450 | 464 | | |
| 465 | + | |
451 | 466 | | |
452 | 467 | | |
453 | 468 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
490 | 491 | | |
491 | 492 | | |
492 | 493 | | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
493 | 497 | | |
494 | 498 | | |
495 | 499 | | |
| |||
670 | 674 | | |
671 | 675 | | |
672 | 676 | | |
| 677 | + | |
673 | 678 | | |
674 | 679 | | |
675 | 680 | | |
| |||
788 | 793 | | |
789 | 794 | | |
790 | 795 | | |
| 796 | + | |
791 | 797 | | |
792 | 798 | | |
793 | 799 | | |
| |||
982 | 988 | | |
983 | 989 | | |
984 | 990 | | |
| 991 | + | |
985 | 992 | | |
986 | 993 | | |
987 | 994 | | |
| |||
990 | 997 | | |
991 | 998 | | |
992 | 999 | | |
| 1000 | + | |
993 | 1001 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
282 | 283 | | |
283 | 284 | | |
284 | 285 | | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
285 | 290 | | |
286 | 291 | | |
287 | 292 | | |
| |||
360 | 365 | | |
361 | 366 | | |
362 | 367 | | |
| 368 | + | |
363 | 369 | | |
364 | 370 | | |
365 | 371 | | |
| |||
432 | 438 | | |
433 | 439 | | |
434 | 440 | | |
| 441 | + | |
435 | 442 | | |
436 | 443 | | |
437 | 444 | | |
| |||
630 | 637 | | |
631 | 638 | | |
632 | 639 | | |
| 640 | + | |
633 | 641 | | |
634 | 642 | | |
635 | 643 | | |
| |||
639 | 647 | | |
640 | 648 | | |
641 | 649 | | |
| 650 | + | |
642 | 651 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
593 | 594 | | |
594 | 595 | | |
595 | 596 | | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
596 | 602 | | |
597 | 603 | | |
598 | 604 | | |
| |||
707 | 713 | | |
708 | 714 | | |
709 | 715 | | |
| 716 | + | |
710 | 717 | | |
711 | 718 | | |
712 | 719 | | |
| |||
1011 | 1018 | | |
1012 | 1019 | | |
1013 | 1020 | | |
| 1021 | + | |
1014 | 1022 | | |
1015 | 1023 | | |
1016 | 1024 | | |
| |||
1216 | 1224 | | |
1217 | 1225 | | |
1218 | 1226 | | |
| 1227 | + | |
1219 | 1228 | | |
1220 | 1229 | | |
1221 | 1230 | | |
| |||
1224 | 1233 | | |
1225 | 1234 | | |
1226 | 1235 | | |
| 1236 | + | |
1227 | 1237 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
1137 | 1137 | | |
1138 | 1138 | | |
1139 | 1139 | | |
| 1140 | + | |
1140 | 1141 | | |
1141 | 1142 | | |
1142 | 1143 | | |
| |||
1149 | 1150 | | |
1150 | 1151 | | |
1151 | 1152 | | |
| 1153 | + | |
1152 | 1154 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
| 321 | + | |
321 | 322 | | |
322 | 323 | | |
323 | 324 | | |
| |||
344 | 345 | | |
345 | 346 | | |
346 | 347 | | |
| 348 | + | |
347 | 349 | | |
348 | 350 | | |
349 | 351 | | |
| |||
356 | 358 | | |
357 | 359 | | |
358 | 360 | | |
| 361 | + | |
359 | 362 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
86 | 90 | | |
87 | 91 | | |
88 | 92 | | |
| |||
117 | 121 | | |
118 | 122 | | |
119 | 123 | | |
| 124 | + | |
120 | 125 | | |
121 | 126 | | |
122 | 127 | | |
| |||
131 | 136 | | |
132 | 137 | | |
133 | 138 | | |
| 139 | + | |
134 | 140 | | |
135 | 141 | | |
136 | 142 | | |
| |||
314 | 320 | | |
315 | 321 | | |
316 | 322 | | |
| 323 | + | |
317 | 324 | | |
318 | 325 | | |
319 | 326 | | |
| |||
322 | 329 | | |
323 | 330 | | |
324 | 331 | | |
| 332 | + | |
325 | 333 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
198 | 199 | | |
199 | 200 | | |
200 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
201 | 206 | | |
202 | 207 | | |
203 | 208 | | |
| |||
260 | 265 | | |
261 | 266 | | |
262 | 267 | | |
| 268 | + | |
263 | 269 | | |
264 | 270 | | |
265 | 271 | | |
| |||
367 | 373 | | |
368 | 374 | | |
369 | 375 | | |
| 376 | + | |
370 | 377 | | |
371 | 378 | | |
372 | 379 | | |
| |||
552 | 559 | | |
553 | 560 | | |
554 | 561 | | |
| 562 | + | |
555 | 563 | | |
556 | 564 | | |
557 | 565 | | |
| |||
560 | 568 | | |
561 | 569 | | |
562 | 570 | | |
| 571 | + | |
563 | 572 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
575 | 575 | | |
576 | 576 | | |
577 | 577 | | |
| 578 | + | |
578 | 579 | | |
579 | 580 | | |
580 | 581 | | |
| |||
587 | 588 | | |
588 | 589 | | |
589 | 590 | | |
| 591 | + | |
590 | 592 | | |
0 commit comments