MCPcopy Create free account
hub / github.com/anomalyco/opencode-bench / cloneScores

Function cloneScores

scripts/discord-sample.ts:73–93  ·  view source on GitHub ↗
(
  scores: EvaluationRunExport["scores"],
  averageShift: number,
  varianceShift = 0,
)

Source from the content-addressed store, hash-verified

71};
72
73const cloneScores = (
74 scores: EvaluationRunExport["scores"],
75 averageShift: number,
76 varianceShift = 0,
77): EvaluationRunExport["scores"] =>
78 scores.map((score) => {
79 const shiftedAverage = Number(
80 Math.min(1, Math.max(0, score.averageScore + averageShift)).toFixed(3),
81 );
82 const shiftedVariance = Number(
83 Math.max(0, score.variance + varianceShift).toFixed(3),
84 );
85
86 return {
87 assignment: { ...score.assignment },
88 averageScore: shiftedAverage,
89 normalizedWeight: score.normalizedWeight,
90 variance: shiftedVariance,
91 judges: score.judges.map((judge) => ({ ...judge })),
92 };
93 });
94
95const claudeScores: EvaluationRunExport["scores"] = [
96 {

Callers 1

discord-sample.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected