google.adk.evaluation.agent_evaluator.AgentEvaluator
An evaluator for Agents, mainly intended for helping with test cases.
root_agent
なければawait get_agent_async()(AgentEvaluator限定ロジック)
eval_dataset_file_path_or_dirから.test.jsonを見つける
test_config.json もサポートしている
initial_session_file
IMO:どういう形式なんだろう?
evaluate_eval_set() を呼び出す
Step 1: Perform evals, basically inferencing and evaluation of metrics
AgentEvaluator._get_eval_results_by_eval_id() (下へ)
Step 2: Post-process the results!
_get_eval_metric_results_with_invocation()
Returns _EvalMetricResultWithInvocation grouped by metric.
_process_metrics_and_get_failures()
Returns a list of failures based on the score for each invocation.
assert not failures, failure_message
Returns EvalCaseResults grouped by eval case id.
serviceでmetricのPythonモジュールの読み込みなど
num_runsを考慮してinferenceしてevaluate