veryfront 0.1.981 → 0.1.982
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/esm/deno.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-comparison.d.ts","sourceRoot":"","sources":["../../../src/src/eval/model-comparison.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,mBAAmB,EAEnB,0BAA0B,EAE1B,UAAU,EACX,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"model-comparison.d.ts","sourceRoot":"","sources":["../../../src/src/eval/model-comparison.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,mBAAmB,EAEnB,0BAA0B,EAE1B,UAAU,EACX,MAAM,YAAY,CAAC;AAylBpB,oFAAoF;AACpF,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,UAAU,EAAE,EACrB,OAAO,EAAE,0BAA0B,GAClC,mBAAmB,CAqBrB;AA0BD,gFAAgF;AAChF,wBAAgB,iCAAiC,CAAC,UAAU,EAAE,mBAAmB,GAAG,MAAM,CAmEzF"}
|
|
@@ -411,14 +411,34 @@ function compareCandidate(candidate, baseline, options) {
|
|
|
411
411
|
};
|
|
412
412
|
}
|
|
413
413
|
function pickRecommendation(candidates) {
|
|
414
|
-
const promotable = candidates
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
414
|
+
const promotable = candidates.filter((candidate) => candidate.decision === "promote-candidate");
|
|
415
|
+
if (promotable.length === 1) {
|
|
416
|
+
const candidate = promotable[0];
|
|
417
|
+
if (candidate) {
|
|
418
|
+
return {
|
|
419
|
+
decision: "promote-candidate",
|
|
420
|
+
model: candidate.model,
|
|
421
|
+
reasons: candidate.reasons,
|
|
422
|
+
};
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
if (promotable.length > 1) {
|
|
426
|
+
const scoredPromotable = promotable
|
|
427
|
+
.filter((candidate) => candidate.objectiveScore !== undefined)
|
|
428
|
+
.sort((a, b) => (b.objectiveScore ?? 0) - (a.objectiveScore ?? 0))[0];
|
|
429
|
+
if (scoredPromotable) {
|
|
430
|
+
return {
|
|
431
|
+
decision: "promote-candidate",
|
|
432
|
+
model: scoredPromotable.model,
|
|
433
|
+
reasons: scoredPromotable.reasons,
|
|
434
|
+
};
|
|
435
|
+
}
|
|
418
436
|
return {
|
|
419
437
|
decision: "promote-candidate",
|
|
420
|
-
|
|
421
|
-
|
|
438
|
+
reasons: [
|
|
439
|
+
`multiple candidate models are promotable: ${promotable.map((candidate) => candidate.model).join(", ")}`,
|
|
440
|
+
"configure --comparison-policy objectives to rank candidates by your product requirements",
|
|
441
|
+
],
|
|
422
442
|
};
|
|
423
443
|
}
|
|
424
444
|
const needsReview = candidates.find((candidate) => candidate.decision === "needs-review");
|