-
Notifications
You must be signed in to change notification settings - Fork 238
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
base: main
Are you sure you want to change the base?
Conversation
const booleanScores = reMapScores(simpleEvalOutput, (response, i) => ({ | ||
testCaseId: response.testCaseId, | ||
evaluation: { | ||
score: i % 2 === 0, |
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.
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.
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.
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}`, |
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.
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.
nit: PR & commit messags title should be |
This is not specific to the CLI, but okay. |
Tooling part of #1642
Checklist (if applicable):