MCPcopy Create free account
hub / github.com/cortexkit/magic-context / loadSnapshot

Function loadSnapshot

packages/plugin/scripts/embedding-baseline-diff.ts:51–58  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

49}
50
51function loadSnapshot(path: string): Snapshot {
52 if (!existsSync(path)) {
53 console.error(`File not found: ${path}`);
54 process.exit(1);
55 }
56 const raw = JSON.parse(readFileSync(path, "utf8"));
57 return raw as Snapshot;
58}
59
60/** Kendall tau-b rank correlation over the intersection of two top-K lists.
61 * Returns null when the intersection is < 2 items (undefined correlation). */

Callers 1

mainFunction · 0.85

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected