MCPcopy Index your code
hub / github.com/OpenPipe/OpenPipe / findResult

Function findResult

app/src/server/tasks/evaluateTestSetEntries.task.ts:88–111  ·  view source on GitHub ↗
({
      outputSourceId,
      comparisonOutputSourceId,
    }: {
      outputSourceId: string;
      comparisonOutputSourceId: string;
    })

Source from the content-addressed store, hash-verified

86 }
87
88 const findResult = async ({
89 outputSourceId,
90 comparisonOutputSourceId,
91 }: {
92 outputSourceId: string;
93 comparisonOutputSourceId: string;
94 }) =>
95 kysely
96 .selectFrom("NodeEntry as ne")
97 .innerJoin("DatasetEvalNodeEntry as dene", "dene.nodeEntryPersistentId", "ne.persistentId")
98 .innerJoin("DatasetEvalResult as der", (join) =>
99 join
100 .onRef("der.nodeEntryInputHash", "=", "ne.inputHash")
101 .on("der.datasetEvalOutputSourceId", "=", outputSourceId)
102 .on("der.comparisonOutputSourceId", "=", comparisonOutputSourceId)
103 .onRef("der.datasetEvalNodeEntryId", "=", "dene.id"),
104 )
105 .innerJoin("DatasetEvalOutputSource as deos", (join) =>
106 join.on("deos.id", "=", outputSourceId),
107 )
108 .selectAll("der")
109 .select(["deos.modelId"])
110 .where("ne.id", "=", nodeEntryId)
111 .executeTakeFirst();
112
113 const [firstResult, secondResult] = await Promise.all([
114 findResult({

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected