Skip to content

v0.3.0

Latest

Choose a tag to compare

@dbreunig dbreunig released this 29 Jul 23:14

Breaking changes

  • Requires pydantic-monty>=0.0.19.
  • MountDir arguments are now keyword-only, e.g. MountDir(virtual_path="/data", host_path="./reports", mode="read-only"). This follows the upstream Monty change.
  • Overlay mounts no longer persist across execute() calls. Overlay writes live for the duration of one call and are then discarded. Use read-write mode for files that must survive across calls.
  • Code now runs in a pool of monty worker subprocesses instead of an in-process interpreter. A crashed worker is replaced without taking down your process.

New features

  • A single MontyInterpreter is now safe to share across threads. Each thread gets its own isolated REPL session from one shared worker pool, so dspy.Evaluate and dspy.Parallel with num_threads work with one interpreter instance.
  • New max_processes constructor parameter caps live workers in the pool. Set it to at least num_threads when running more threads than CPU cores.
  • New request_timeout constructor parameter sets a hard per-execute() time limit in seconds. Code that exceeds it raises CodeInterpreterError, and the next execute() starts with a fresh session.
  • A crashed or timed-out worker surfaces as CodeInterpreterError, and the interpreter recovers automatically with a fresh session. A SUBMIT() captured before the crash is still honored.
  • Sandbox code can now define classes (new in Monty 0.0.19).
  • The unicodedata module is now available in sandbox code.