-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Auto-discover test_config.json only for single-file adk eval input
#4412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
… eval When `--config_file_path` is omitted, `adk eval` now auto-discovers `test_config.json` only for single eval-file input by looking in the same directory as the eval file. If no adjacent `test_config.json` is found, behavior remains unchanged and the built-in default evaluation criteria are used.
Summary of ChangesHello @ftnext, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refines the configuration discovery mechanism for the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a useful feature to auto-discover test_config.json when running adk eval on a single file. The implementation is straightforward, with the core logic encapsulated in a new _resolve_eval_config_file_path helper function. The changes are well-supported by new unit tests that cover the various config file resolution scenarios. I have one suggestion to simplify the logic in the new helper function.
Please ensure you have read the contribution guide before creating a pull request.
Link to Issue or Description of Change
1. Link to an existing issue (if applicable):
Problem:
adk evalbehavior was inconsistent with the expected config discovery flow.When
--config_file_pathwas omitted, CLI always fell back to default criteria,instead of using
test_config.jsonlocated next to an eval file.Solution:
Added config path resolution in
adk eval:--config_file_pathis provided, use it as-is.<eval_file_dir>/test_config.json.This keeps behavior explicit for mixed-directory multi-file runs while enabling
convenient per-file config discovery for single-file usage.
Testing Plan
Unit Tests:
Passed locally:
% pytest tests/unittests/cli ========================= 272 passed, 140 warnings in 6.60s =========================Manual End-to-End (E2E) Tests:
Ran
adk eval home_automation_agent tests/fixtures/home_automation_agent/simple_test.test.jsonand verified that it uses
tests/fixtures/home_automation_agent/test_config.json.Checklist
Additional context
This PR intentionally limits auto-discovery to single-file input to avoid ambiguous behavior when multiple eval files are provided from different directories.