Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mattpocock committed Dec 3, 2024
1 parent 9f5ba7a commit 72d5e7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/evalite-core/src/json-db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const appendToJsonDb = async (opts: {
const jsonDbTask: JsonDBEval = {
name: task.name,
score: average(task.meta.evalite?.results || [], (t) => {
return average(t.scores, (s) => s.score);
return average(t.scores, (s) => s.score ?? 0);
}),
duration: task.meta.evalite?.duration ?? 0,
results: [],
Expand All @@ -58,7 +58,7 @@ export const appendToJsonDb = async (opts: {
expected,
scores,
duration,
score: average(scores, (s) => s.score),
score: average(scores, (s) => s.score ?? 0),
traces: task.meta.evalite.traces,
});
}
Expand Down

0 comments on commit 72d5e7f

Please sign in to comment.