From 55770de64cff024ab6b2a68359cd1436e1108e67 Mon Sep 17 00:00:00 2001 From: Arjun Attam Date: Tue, 2 Apr 2024 22:16:59 +0530 Subject: [PATCH 1/2] fix: python scorer should prefer config.name --- packages/scorer/src/provider/deterministic/script.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/scorer/src/provider/deterministic/script.ts b/packages/scorer/src/provider/deterministic/script.ts index 728b7ebb..e3bdafaf 100644 --- a/packages/scorer/src/provider/deterministic/script.ts +++ b/packages/scorer/src/provider/deterministic/script.ts @@ -29,7 +29,7 @@ export const scoreWithPythonScript: ScoringFn = async ({ return [ { score: 0, - name, + name: config.name || name, message: "Python script path is not provided for running the scorer", }, ]; @@ -57,7 +57,7 @@ export const scoreWithPythonScript: ScoringFn = async ({ JSON.stringify([ { score: 0, - name, + name: config.name || name, message: "Scorer script timed out", }, ]), @@ -79,7 +79,7 @@ export const scoreWithPythonScript: ScoringFn = async ({ JSON.stringify([ { score: 0, - name, + name: config.name || name, message: `Scorer script error: ${message}`, }, ]), From 3dcf9cfa1099600401b5fff41ec7d1740c3437c1 Mon Sep 17 00:00:00 2001 From: Arjun Attam Date: Wed, 3 Apr 2024 10:17:52 +0530 Subject: [PATCH 2/2] chore: changeset --- .changeset/quick-plants-occur.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/quick-plants-occur.md diff --git a/.changeset/quick-plants-occur.md b/.changeset/quick-plants-occur.md new file mode 100644 index 00000000..7ca91c8c --- /dev/null +++ b/.changeset/quick-plants-occur.md @@ -0,0 +1,5 @@ +--- +"@empiricalrun/scorer": patch +--- + +fix: python script scorer should prefer config.name