MCPcopy Create free account
hub / github.com/google/adk-samples / print_report

Function print_report

python/agents/invoice-processing/eval/eval.py:1152–1176  ·  view source on GitHub ↗

Print evaluation report to console.

(stats: dict, results: list[dict])

Source from the content-addressed store, hash-verified

1150
1151
1152def print_report(stats: dict, results: list[dict]) -> None:
1153 """Print evaluation report to console."""
1154 print()
1155 print("=" * 70)
1156 print("EVALUATION REPORT")
1157 print("=" * 70)
1158
1159 if stats["evaluated"] == 0:
1160 print(f"\nNo cases evaluated. {stats['errors']} error(s).")
1161 return
1162
1163 total = stats["evaluated"]
1164
1165 print(
1166 f"\n Cases: {stats['evaluated']} evaluated, {stats['errors']} errors"
1167 )
1168 print(f" Passed: {stats['passed']}/{total} ({stats['pass_rate']:.1%})")
1169 print(f" Failed: {stats['failed']}/{total}")
1170
1171 _print_decision_stats(stats)
1172 _print_group_and_field_accuracy(stats)
1173 _print_llm_and_case_details(stats, results)
1174
1175 print()
1176 print("=" * 70)
1177
1178
1179# ============================================================================

Callers 1

mainFunction · 0.85

Calls 3

_print_decision_statsFunction · 0.85

Tested by

no test coverage detected