Skip to content

Conversation

@nimanthadilz
Copy link
Contributor

Link to Issue or Description of Change

1. Link to an existing issue (if applicable):

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.

508807185-9e8fe1c3-d04a-43dd-acf9-0befaa1b247d

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:
508810179-b91c5bca-fb43-480b-90ff-bca2e909417c

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.
  • All unit tests pass locally.
image

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. You will have to manually build & install the fixed adk version to test it.

Checklist

  • I have read the CONTRIBUTING.md document.
  • I have performed a self-review of my own code.
  • 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.
  • New and existing unit tests pass locally with my changes.
  • I have manually tested my changes end-to-end.
  • Any dependent changes have been merged and published in downstream modules.

@adk-bot adk-bot added the eval [Component] This issue is related to evaluation label Nov 4, 2025
@nimanthadilz nimanthadilz marked this pull request as ready for review November 4, 2025 02:11
@wuliang229 wuliang229 self-requested a review November 4, 2025 02:11
@wuliang229 wuliang229 added the ready to pull [Status] This PR is ready to be importing back to Google label 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
@adk-bot
Copy link
Collaborator

adk-bot commented Nov 5, 2025

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.

@adk-bot adk-bot closed this Nov 5, 2025
@ryanaiagent ryanaiagent self-assigned this Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

eval [Component] This issue is related to evaluation ready to pull [Status] This PR is ready to be importing back to Google

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agent Evaluator print_detailed_results output is not readable

4 participants