Skip to content
Poisson Labs Docs
GitHub poissonlabs.ai

Run on

Modal

--backend modal runs a sweep’s rollouts in parallel containers on Modal, on your own account. Prove builds the image, sends the episodes in batches, and writes the rows to your local store as they come back. Backends is Prove’s own page on it, with what leaves your machine.

The modal extra brings the Modal client.

Terminal window
pip install "poisson-prove[modal]"

A Modal account, set up on this machine. modal setup signs you in.

Terminal window
modal setup

Keys your agent needs reach it as Modal secrets, named in the spec’s secrets. Prove mounts them by name and never reads their values.

The [modal] table of the spec says how the sweep runs, and a [modal.image] table what the containers hold. Every key is optional, and each is on The sweep spec. This is the block Prove’s docs give: its secret and its package are an agent that calls OpenAI, so name your own.

prove.toml
[modal]
concurrency = 32
est_seconds_per_episode = 4.0
max_cost = 5.0
secrets = ["openai"]
[modal.image]
python = "3.11"
pip = ["openai>=2.20"]

With est_seconds_per_episode the plan carries a cost estimate, from Modal’s prices as Prove carries them. It covers compute only, not model tokens. With max_cost a sweep whose estimate is above it is refused before anything starts.

On the keyless example’s spec, which has no [modal] table, sweep --backend modal --dry-run prints the plan and stops. The Backend, Image, Containers and Secrets lines say what would run on Modal, and the Cost line says there is no estimate without est_seconds_per_episode.

Terminal window
poisson-prove init --example
Output2 lines · exit 0
ok wrote prove.toml: a sweep of the keyless mock agent, 9 conditions x 194 replicates
next: poisson-prove sweep
Terminal window
poisson-prove sweep --backend modal --dry-run
Output11 lines · exit 0
plan 1,746 rollouts of mock-agent: 9 cells x 194 replicates on modal, unknown (no estimate; Modal's 2026-09-03 prices, which cover compute, not model tokens)
target poisson_prove.examples.mock_agent:rollout
outcomes failures: timeout, violated
Sweep: 2 axes · 9 cells · N=194 → 1,746 rollouts
Backend: modal · target: mock-agent · t_unit: tool_calls
Image: python 3.11 · 0 pip · gpu: none · import: poisson_prove.examples.mock_agent:rollout
Target: poisson_prove.examples.mock_agent:rollout · resolved inside the container, not on this machine
Containers: up to 16 · batch: 64 · episode timeout: 300s
Secrets: none
Cost: unknown (no estimate; Modal's 2026-09-03 prices, which cover compute, not model tokens)
smallest rise one condition alone would be flagged for 0.199 at its worst base rate, 0.400 (Fisher, q 0.05 over 18 tests, 4 times in 5; you accept up to 0.200)

The dry run checks the extra and the plan. It does not sign in to Modal: it prints the same plan on a machine that is not signed in. The first sweep is what reaches your account. Run Prove on Modal runs one, about a cent of compute, with its output stored.