kpfadnis commited on
Commit
4d12df4
·
1 Parent(s): b0476f6

fix (metrics): Fix median aggregator due to incorrect sort.

Browse files
Files changed (1) hide show
  1. src/utilities/metrics.ts +1 -1
src/utilities/metrics.ts CHANGED
@@ -225,7 +225,7 @@ function computeMedian(
225
  );
226
 
227
  // Step 5: Sort the numeric scores
228
- const sortedNumericScores = numericScores.toSorted();
229
 
230
  // Step 6: Calculate median
231
  const median =
 
225
  );
226
 
227
  // Step 5: Sort the numeric scores
228
+ const sortedNumericScores = numericScores.toSorted((a, b) => a - b);
229
 
230
  // Step 6: Calculate median
231
  const median =