fix: agent evaluations detailed output rows wrapping issue#3381
Closed
nimanthadilz wants to merge 4 commits intogoogle:mainfrom
Closed
fix: agent evaluations detailed output rows wrapping issue#3381nimanthadilz wants to merge 4 commits intogoogle:mainfrom
nimanthadilz wants to merge 4 commits intogoogle:mainfrom
Conversation
wuliang229
approved these changes
Nov 5, 2025
copybara-service bot
pushed a commit
that referenced
this pull request
Nov 5, 2025
Merge #3381 ### Link to Issue or Description of Change **1. Link to an existing issue (if applicable):** - Closes: #3363 - This PR sets a max column width for the table printed in detailed output of agent evaluations. **Problem:** The detailed output of agent evaluations is not readable due to rows in the table getting wrapped. This happens when there are long text values in cells. <img width="1904" height="717" alt="508807185-9e8fe1c3-d04a-43dd-acf9-0befaa1b247d" src="https://github.com/user-attachments/assets/61526ad2-8a9e-4c18-83e2-51a3b9b32d2b" /> **Solution:** Existing code uses `tabulate` python package to format the table. We can set a maximum column width using `maxcolwidths` parameter. I have set it to `25`. After the fix: <img width="1882" height="711" alt="508810179-b91c5bca-fb43-480b-90ff-bca2e909417c" src="https://github.com/user-attachments/assets/b653f825-719e-4101-9acb-e28a52694cf8" /> ### Testing Plan I have manually tested if the output is properly displayed after changes. Please let me know if any unit tests can be added for this. **Unit Tests:** - [ ] I have added or updated unit tests for my change. - [x] All unit tests pass locally. <img width="1627" height="39" alt="image" src="https://github.com/user-attachments/assets/59a70619-3669-4113-8ab7-dcff130ee241" /> **Manual End-to-End (E2E) Tests:** 1. Create a simple agent using adk (preferably an agent that outputs a long text). 2. Create an evalset for this agent. 3. Run the evalset with `print_detailed_results` option and check if the output is properly displayed. If you want a quick setup for testing this, I have a sample repo with an agent and an evalset [here](https://github.com/nimanthadilz/adk-test/tree/reproduce-print-detailed-results). You will have to manually build & install the fixed adk version to test it. ### Checklist - [x] I have read the [CONTRIBUTING.md](https://github.com/google/adk-python/blob/main/CONTRIBUTING.md) document. - [x] I have performed a self-review of my own code. - [x] I have commented my code, particularly in hard-to-understand areas. - [ ] I have added tests that prove my fix is effective or that my feature works. - [x] New and existing unit tests pass locally with my changes. - [x] I have manually tested my changes end-to-end. - [x] Any dependent changes have been merged and published in downstream modules. COPYBARA_INTEGRATE_REVIEW=#3381 from nimanthadilz:fix-eval-output-rows-wrapping-issue f6d4012 PiperOrigin-RevId: 828265715
Collaborator
|
Thank you @nimanthadilz for your contribution! 🎉 Your changes have been successfully imported and merged via Copybara in commit 4284c61. Closing this PR as the changes are now in the main branch. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to Issue or Description of Change
1. Link to an existing issue (if applicable):
print_detailed_resultsoutput is not readable #3363Problem:
The detailed output of agent evaluations is not readable due to rows in the table getting wrapped. This happens when there are long text values in cells.
Solution:
Existing code uses
tabulatepython package to format the table. We can set a maximum column width usingmaxcolwidthsparameter. I have set it to25.After the fix:

Testing Plan
I have manually tested if the output is properly displayed after changes. Please let me know if any unit tests can be added for this.
Unit Tests:
Manual End-to-End (E2E) Tests:
print_detailed_resultsoption and check if the output is properly displayed.If you want a quick setup for testing this, I have a sample repo with an agent and an evalset here. You will have to manually build & install the fixed adk version to test it.
Checklist