Skip to content

Commit

Permalink
support for code imported libraries (stanfordnlp#2010)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnavsinghvi11 authored Jan 6, 2025
1 parent 92b29ee commit ac5bf56
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions dspy/primitives/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ac5bf56

Please sign in to comment.