Skip to content

Display formatted table when run with gh models eval #76

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

Merged
merged 4 commits into from
Jul 22, 2025

Conversation

Yuzuki-S
Copy link
Contributor

@Yuzuki-S Yuzuki-S commented Jul 22, 2025

Before After
image image

@Yuzuki-S Yuzuki-S changed the title Show a formatted table when run with gh models eval Display formatted table when run with gh models eval Jul 22, 2025
@Yuzuki-S Yuzuki-S self-assigned this Jul 22, 2025
@Yuzuki-S Yuzuki-S marked this pull request as ready for review July 22, 2025 05:21
@Copilot Copilot AI review requested due to automatic review settings July 22, 2025 05:21
@Yuzuki-S Yuzuki-S requested a review from a team as a code owner July 22, 2025 05:21
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the output formatting for the gh models eval command by replacing plain text output with formatted tables. The changes improve readability by using colored table output to display test results and evaluation details.

  • Replaces plain text output with formatted tables using the tableprinter package
  • Adds color coding (green for passed, red for failed) to improve visual feedback
  • Includes table headers and structured layout for evaluation results

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
cmd/eval/eval.go Implements table formatting with color support for test results and evaluation output
cmd/eval/eval_test.go Updates test assertions to accommodate the new table-formatted output structure

}

err := printer.Render()
if err != nil {
Copy link
Preview

Copilot AI Jul 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Silent error handling by returning early without logging or informing the user that table rendering failed. Consider logging the error or falling back to plain text output.

Copilot uses AI. Check for mistakes.

}

err = table.Render()
if err != nil {
Copy link
Preview

Copilot AI Jul 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Silent error handling by returning early without logging or informing the user that table rendering failed. Consider logging the error or falling back to plain text output.

Copilot uses AI. Check for mistakes.

@Yuzuki-S Yuzuki-S merged commit 7fc3515 into main Jul 22, 2025
5 checks passed
@Yuzuki-S Yuzuki-S deleted the yuzuki-s/eval-show-table branch July 22, 2025 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants