diff --git a/packages/evalite-core/src/db/tests/db.test.ts b/packages/evalite-core/src/db/tests/db.test.ts index 5446736..dbcc9e2 100644 --- a/packages/evalite-core/src/db/tests/db.test.ts +++ b/packages/evalite-core/src/db/tests/db.test.ts @@ -23,7 +23,6 @@ describe("getEvalsAverageScores", () => { meta: { evalite: { duration: 100, - sourceCodeHash: "abc", results: [ { input: "input", diff --git a/packages/evalite-core/src/types.ts b/packages/evalite-core/src/types.ts index 39c90ac..8ea0652 100644 --- a/packages/evalite-core/src/types.ts +++ b/packages/evalite-core/src/types.ts @@ -48,7 +48,6 @@ export declare namespace Evalite { export type TaskMeta = { results: Result[]; duration: number | undefined; - sourceCodeHash: string; }; export type Task = ( diff --git a/packages/evalite/src/command.ts b/packages/evalite/src/command.ts index 8ec7d7c..8c91d51 100644 --- a/packages/evalite/src/command.ts +++ b/packages/evalite/src/command.ts @@ -2,12 +2,6 @@ import { Command } from "commander"; import { runVitest } from "./run-vitest.js"; import { createDatabase } from "@evalite/core/db"; -declare module "vitest" { - export interface ProvidedContext { - evaliteInputHash: string; - } -} - export const program = new Command(); program.description("Run evals once and exit").action(() => { diff --git a/packages/evalite/src/index.ts b/packages/evalite/src/index.ts index 6374778..075ec00 100644 --- a/packages/evalite/src/index.ts +++ b/packages/evalite/src/index.ts @@ -79,8 +79,6 @@ export const evalite = ( opts: Evalite.RunnerOpts ) => { return it(testName, async ({ task }) => { - const sourceCodeHash = inject("evaliteInputHash"); - const data = await opts.data(); const start = performance.now(); const results = await Promise.all( @@ -107,7 +105,6 @@ export const evalite = ( task.meta.evalite = { results, duration: Math.round(performance.now() - start), - sourceCodeHash, }; }); }; diff --git a/packages/evalite/src/run-vitest.ts b/packages/evalite/src/run-vitest.ts index 193d1ad..a3af9b4 100644 --- a/packages/evalite/src/run-vitest.ts +++ b/packages/evalite/src/run-vitest.ts @@ -60,22 +60,6 @@ export const runVitest = async (opts: { } ); - await vitest.collect(filters); - - const allFileResults = Array.from(vitest.vitenode.fetchCache); - - const sourceFileResults = allFileResults.filter(([path, item]) => { - return !(path.endsWith(".eval.ts") || path.endsWith(".eval.js")); - }); - - const codeFromSourceFiles = sourceFileResults.reduce((acc, [path, item]) => { - return acc + (item.result.code ?? ""); - }, ""); - - const hash = createHash("sha256").update(codeFromSourceFiles).digest("hex"); - - vitest.provide("evaliteInputHash", hash); - await vitest.start(filters); const dispose = registerConsoleShortcuts(