@m4trix/evals 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli-simple.cjs +164 -84
- package/dist/cli-simple.cjs.map +1 -1
- package/dist/cli-simple.js +164 -84
- package/dist/cli-simple.js.map +1 -1
- package/dist/cli.cjs +52 -18
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +52 -18
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2285,26 +2285,60 @@ function buildDetailRows(run, testCases, evaluatorNameById) {
|
|
|
2285
2285
|
":",
|
|
2286
2286
|
" ",
|
|
2287
2287
|
/* @__PURE__ */ jsx(Text, { color: item.passed ? "green" : "red", bold: true, children: item.passed ? "PASS" : "FAIL" }),
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
] }, m.id);
|
|
2305
|
-
})
|
|
2288
|
+
item.metrics && item.metrics.length > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2289
|
+
" ",
|
|
2290
|
+
item.metrics.map((m) => {
|
|
2291
|
+
const def = getMetricById(m.id);
|
|
2292
|
+
if (!def)
|
|
2293
|
+
return null;
|
|
2294
|
+
const formatted = def.format(m.data);
|
|
2295
|
+
return /* @__PURE__ */ jsxs(Text, { color: "gray", children: [
|
|
2296
|
+
"[",
|
|
2297
|
+
def.name ? `${def.name}: ` : "",
|
|
2298
|
+
formatted,
|
|
2299
|
+
"]",
|
|
2300
|
+
" "
|
|
2301
|
+
] }, m.id);
|
|
2302
|
+
})
|
|
2303
|
+
] }) : null
|
|
2306
2304
|
] }, `tc-${tc.testCaseId}-${item.evaluatorId}`)
|
|
2307
2305
|
);
|
|
2306
|
+
if (item.scores.length > 0) {
|
|
2307
|
+
for (let sIdx = 0; sIdx < item.scores.length; sIdx++) {
|
|
2308
|
+
const s = item.scores[sIdx];
|
|
2309
|
+
const def = getScoreById(s.id);
|
|
2310
|
+
const scoreLabel = def ? def.name ?? def.id : s.id;
|
|
2311
|
+
rows.push(
|
|
2312
|
+
/* @__PURE__ */ jsxs(
|
|
2313
|
+
Text,
|
|
2314
|
+
{
|
|
2315
|
+
color: scoreColor(toNumericScore(s.data) ?? 0),
|
|
2316
|
+
children: [
|
|
2317
|
+
" ",
|
|
2318
|
+
scoreLabel,
|
|
2319
|
+
": ",
|
|
2320
|
+
formatScorePart(s)
|
|
2321
|
+
]
|
|
2322
|
+
},
|
|
2323
|
+
`tc-${tc.testCaseId}-${item.evaluatorId}-score-${sIdx}`
|
|
2324
|
+
)
|
|
2325
|
+
);
|
|
2326
|
+
}
|
|
2327
|
+
} else {
|
|
2328
|
+
rows.push(
|
|
2329
|
+
/* @__PURE__ */ jsxs(
|
|
2330
|
+
Text,
|
|
2331
|
+
{
|
|
2332
|
+
color: "gray",
|
|
2333
|
+
children: [
|
|
2334
|
+
" ",
|
|
2335
|
+
"n/a"
|
|
2336
|
+
]
|
|
2337
|
+
},
|
|
2338
|
+
`tc-${tc.testCaseId}-${item.evaluatorId}-n/a`
|
|
2339
|
+
)
|
|
2340
|
+
);
|
|
2341
|
+
}
|
|
2308
2342
|
if (!item.passed && item.logs && item.logs.length > 0) {
|
|
2309
2343
|
for (let logIdx = 0; logIdx < item.logs.length; logIdx++) {
|
|
2310
2344
|
const log = item.logs[logIdx];
|