From ac5bf56bb1ed7261d9637168563328c1dfeb27af Mon Sep 17 00:00:00 2001 From: arnavsinghvi11 <54859892+arnavsinghvi11@users.noreply.github.com> Date: Sun, 5 Jan 2025 17:48:19 -0800 Subject: [PATCH] support for code imported libraries (#2010) --- dspy/primitives/runner.js | 1 + 1 file changed, 1 insertion(+) diff --git a/dspy/primitives/runner.js b/dspy/primitives/runner.js index 49f4956eb..642141078 100644 --- a/dspy/primitives/runner.js +++ b/dspy/primitives/runner.js @@ -35,6 +35,7 @@ for await (const line of readLines(Deno.stdin)) { // Wrap execution in a try/catch so we can handle syntax errors, etc. try { + await pyodide.loadPackagesFromImports(code); // 1. Temporarily override stdout/stderr so we can capture prints. pyodide.runPython(` import sys