Skip to content

Commit

Permalink
Merge pull request #21 from parea-ai/PAI-701-enable-returning-none-fo…
Browse files Browse the repository at this point in the history
…r-eval-function-to-be-ignored

feat: enable skipping eval functions
  • Loading branch information
joschkabraun authored Feb 16, 2024
2 parents 8e306a9 + 3bdee3a commit 42b38eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils/trace_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ export const handleRunningEvals = async (
options?.evalFuncs.forEach((func) => {
try {
const score = func(traceLog);
scores.push({ name: func.name, score });
if (score !== undefined && score !== null) {
scores.push({ name: func.name, score });
}
} catch (e) {
console.error(`Error occurred calling evaluation function '${func.name}', ${e}`, e);
}
Expand Down

0 comments on commit 42b38eb

Please sign in to comment.