Skip to content

feat(cli/evals): Generate metricSummaries #2768

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

ssbushi
Copy link
Contributor

@ssbushi ssbushi commented Apr 15, 2025

Tooling part of #1642

Checklist (if applicable):

const booleanScores = reMapScores(simpleEvalOutput, (response, i) => ({
testCaseId: response.testCaseId,
evaluation: {
score: i % 2 === 0,
Copy link
Contributor

Choose a reason for hiding this comment

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

This is hard to read. I will have to look at simpleEvalOutput and do the math to understand what this should be. Please just define the test case here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was trying to avoid redefining the EvalResponse object for every test case since it is already a large object, I can add comments to the override function here to make the scores more obvious. LMK if that is helpful.

If not, I can definitely repeat the EvalResponse for each test case.

const stringScores = reMapScores(simpleEvalOutput, (response, i) => ({
testCaseId: response.testCaseId,
evaluation: {
score: `TYPE_${i % 2}`,
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto. Maybe instead of reMapScores you can have a helper that takes an array of Score objects and generates Record<string, EvalResponse> with testcaseIds. That might be concise enough and easier to read.

@ssbushi ssbushi requested a review from shrutip90 April 17, 2025 18:04
@pavelgj
Copy link
Collaborator

pavelgj commented Apr 19, 2025

nit: PR & commit messags title should be feat(cli) or feat(cli/evals)

@ssbushi
Copy link
Contributor Author

ssbushi commented Apr 22, 2025

nit: PR & commit messags title should be feat(cli) or feat(cli/evals)

This is not specific to the CLI, but okay.

@ssbushi ssbushi changed the title feat(evals): Generate metricSummaries feat(cli/evals): Generate metricSummaries Apr 22, 2025
@ssbushi ssbushi requested a review from pavelgj April 22, 2025 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants