adk-python icon indicating copy to clipboard operation
adk-python copied to clipboard

Agent evaluation requires Application Default Credentials

Open hkbb2014 opened this issue 1 year ago • 2 comments

I was evaluating the agents with the following command:

adk eval 8_evaluate 8_evaluate\eval_math_1.evalset.json

I got this message:

Using evaluation creiteria: {'tool_trajectory_avg_score': 1.0, 'response_match_score': 0.8}
Running Eval: 8_evaluate\eval_math_1.evalset.json:case1
Metric: tool_trajectory_avg_score       Status: EvalStatus.PASSED       Score: 1.0      Threshold: 1.0
Error: Your default credentials were not found. To set up Application Default Credentials, see https://cloud.google.com/docs/authentication/external/set-up-adc for more information.
*********************************************************************
Eval Run Summary

Why I need to setup Application Default Credentials (ADC) for just evaluating my agents? do I need to use google cloud for the evaluation?

hkbb2014 avatar May 02 '25 16:05 hkbb2014

I'm also trying to get AgentEvaluator.evaluate(...) to work, and I'm wondering why I need Google Credentials for this and if there's a way to use it without them. google.auth.exceptions.DefaultCredentialsError: Your default credentials were not found.

MarkusNeusinger avatar May 21 '25 09:05 MarkusNeusinger

Yes, you do need Google Cloud Credentials for your Agent Evaluator. These needed for the inferencing stage of the Eval, in this stage, given the eval data set the Agent is scraped to generate new inferences/responses. This usually means talking to the LLM hosted in Google Cloud.

ankursharmas avatar May 21 '25 18:05 ankursharmas