Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
f86a01e
[Fix] Wrap the per-job port window every 500 jobs, so large sweeps ke…
aaronsmulktis Oct 29, 2026
deebdf0
[Feature] parallel_tasks.repeats: run every job N times with the seed…
aaronsmulktis Oct 29, 2026
bddfdd3
[Feature] max_parallel: run local sweep jobs concurrently, one spawne…
aaronsmulktis Oct 29, 2026
e522768
[Feature] Group a sweep's W&B runs under its run directory and type e…
aaronsmulktis Oct 29, 2026
b41ecb8
[Feature] scripts/sweep_slurm.sh: vLLM discovery in front of a local …
aaronsmulktis Oct 29, 2026
b4035cd
Merge main into aaronsmulktis/sweep-addons (#105 merged with readable…
aaronsmulktis Oct 30, 2026
0c7c951
[Feature] launch_parallel_agents.py is the one sweep entry point: age…
Nov 16, 2026
e2b8d1c
Merge remote-tracking branch 'upstream/main' into aaronsmulktis/compo…
aaronsmulktis Nov 19, 2026
5e8945e
[Improvement] Composer: one parallel interface, launch_parallel_agent…
aaronsmulktis Nov 19, 2026
6ad1f97
[Improvement] Composer: hide the abstention agent and example tasks
aaronsmulktis Nov 19, 2026
e8006ac
[Fix] Composer server tests: drop the import the script-allowlist tes…
aaronsmulktis Nov 19, 2026
dc067e3
[Fix] Ctrl-C stops a local sweep; document sweeps in the README and docs
aaronsmulktis Nov 20, 2026
6a6687a
Merge remote-tracking branch 'upstream/aaronsmulktis/sweep-addons' in…
aaronsmulktis Nov 20, 2026
6be8af9
[Fix] SIGTERM stops a local sweep too; Ctrl-C works off the main thread
aaronsmulktis Nov 20, 2026
d8db238
Merge remote-tracking branch 'upstream/aaronsmulktis/sweep-addons' in…
aaronsmulktis Nov 20, 2026
b1897c1
[Fix] A web app stops itself once its run is gone, however the run went
aaronsmulktis Nov 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 37 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,22 +121,47 @@ Learn more about launching with OpenAI, Claude, and VLLM models such as UI-Tars

### Sweep tasks and agents

`launch_parallel_agents.py` is the one entry point for running many episodes,
on this machine or on SLURM. A sweep is task files × agents × app variations ×
tasks × repeats, and every run gets its own web app, port window, logs and
databases.

```bash
# every task in two files, with two agents, across the configured app variations
uv run launch_parallel_agents.py tasks=original_tasks.yaml,longer_horizon.yaml \
agents=dummy,GPT-5.5-computer-use-abstention
agents=dummy,GPT-5.5-computer-use

# four runs at a time on this machine, each task three times, grouped in W&B
uv run launch_parallel_agents.py agents=GPT-5.5-computer-use \
max_parallel=4 parallel_tasks.repeats=3 use_wandb=True

# on SLURM, one job per run, against the node serving a self-hosted model
uv run launch_parallel_agents.py mode=slurm_cluster \
agents=gemma-4-31B-computer-use agent.hostname=auto
```

This runs every task from each file with every agent and each configured app
variation. Config names may omit `.yaml`; overlapping task names in different
files remain separate runs. Local jobs run sequentially; `mode=slurm_cluster`
submits them concurrently using the existing SLURM settings.

Use `parallel_tasks.task_names=[task_a,task_b]` to select a subset across the
files. Existing `agent=...`, `tasks=...` and Hydra `--multirun` commands retain
their behavior. `agents=...` selects one parallel sweep and cannot be combined
with `agent=...` or `--multirun`.
An explicit single `tasks=...` file also runs in full with `agents=...`, unless
`parallel_tasks.task_names` selects a subset.
| Option | Effect |
| --- | --- |
| `tasks=a.yaml,b.yaml` | Task files to sweep (`.yaml` optional). The same task name in two files is two runs. |
| `agents=a,b` | Agents to sweep. Not combinable with `agent=...` or `--multirun`. |
| `parallel_tasks.task_names=[x,y]` | A subset of tasks across the files; `all` for every task. An explicit single `tasks=...` file runs in full with `agents=...` unless this selects a subset. |
| `parallel_tasks.app_variations=[[],["apps/theme=dark"]]` | App variations; each inner list is one variation's overrides (`[]` is the default apps). |
| `parallel_tasks.repeats=N` | Every run N times with the seed fixed, to measure run-to-run variance. |
| `max_parallel=N` | Local only: N runs at once, each in its own process, logging to `<job_id>/run.log`, with a summary at the end. The default, 1, runs them one at a time and streams to the terminal. |
| `mode=slurm_cluster` | Submit through submitit, one CPU job per run, with `slurm_sweep_launcher` from `config/mode/slurm_cluster.yaml`. |
| `agent.hostname=auto` | Find the SLURM node serving a self-hosted (vLLM) agent's model, from your running jobs. |
| `use_wandb=True` | The sweep's runs share a W&B group named after its `run-<id>` directory, with the agent as `job_type`. |

**Stopping a local sweep.** Ctrl-C stops it: queued runs never start, and
running ones stop their web apps and exit (Ctrl-C again kills them at once).
The launcher exits with status 130, or 143 on `kill`. Any failed run makes it
exit non-zero too. A web app never outlives its run: one killed outright
(`kill -9`, the OOM killer, that second Ctrl-C) still has its web app stop
itself within a second or so, freeing the port.

SLURM setup (account, QOS, a shared `logs_dir`, the vLLM serve job) is in the
[agents docs](docs/agents.md). Existing `agent=...`, `tasks=...` and Hydra
`--multirun` commands keep their behavior.

`logs_dir` is a parent directory. Every launcher invocation creates a fresh
`run-<id>/` underneath it and prints `Run directory: <path>`. Job configs, logs
Expand Down
18 changes: 13 additions & 5 deletions config/compose_rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
# task_app config/apps apps the selected task(s) touch
# task_in_tasks every selected task_name is in the selected tasks
# group(s) -- several combine into one inventory
# target single | sweep | pool | slurm_pool (the resolved
# target: Worker pool + mode=slurm_cluster is slurm_pool)
# target single | sweep (the resolved target)
# sweep_axes apps/* groups and task_name chosen away from
# their default (what a frozen suite pins itself)
# Values: a literal, a list (any of), null, or a comparison string
Expand Down Expand Up @@ -61,12 +60,21 @@
fix: {apps.onlineshop.enable: true}

- id: vllm_agent_needs_host
when: {agent.client_type: vllm, agent.hostname: null, target: [single, sweep, pool]}
when: {agent.client_type: vllm, agent.hostname: null, mode: local}
then: require
reason: >-
This agent talks to a self-hosted vLLM server at http://<agent.hostname>:<agent.port>/v1.
Pass agent.hostname=<node> as an extra override, or use the SLURM worker
pool, which discovers the node serving the model.
Pass agent.hostname=<node> as an extra override (localhost if you serve it
here).

- id: vllm_agent_on_slurm_finds_host
when: {agent.client_type: vllm, agent.hostname: null, mode: slurm_cluster}
then: require
reason: >-
This agent talks to a self-hosted vLLM server. On SLURM,
agent.hostname=auto finds the node serving its model among your running
jobs (start the vLLM serve job first); agent.hostname=<node> pins one.
fix: {agent.hostname: auto}

- id: gpt55_agent_needs_key
when: {agent: [GPT-5.5-computer-use, GPT-5.5-screen-and-text, GPT-5.5-text-only]}
Expand Down
15 changes: 15 additions & 0 deletions config/config_parallel_tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@ parallel_tasks:
# One override now themes every app -- that is the point of the shared
# `apps/theme` group replacing the per-app `appearance` ones.
- ["apps/theme=dark"]
# Runs per job, to measure an agent's run-to-run variance. The seed stays
# fixed, so the environment does not vary with it.
repeats: 1

# Local jobs to run at once (mode=local only; SLURM schedules its own). 1 runs
# them one at a time in this process, streaming to the terminal. Above 1, each
# job runs in its own process and writes to <job logs_dir>/run.log, with a
# summary at the end; any failure exits non-zero. Ctrl-C stops the sweep:
# queued jobs never start and running ones stop their web apps (exit 130).
max_parallel: 1

# auto-populated by launch_parallel_agents.py
task_name: null
Expand Down Expand Up @@ -120,3 +130,8 @@ wandb:
tags: null
save_code: True
reinit: True
# Every run in one sweep shares a group (the sweep's run-<id> directory name
# unless set), and job_type defaults to each run's agent, so a W&B report can
# compare agents across one sweep.
group: null
job_type: null
67 changes: 66 additions & 1 deletion docs/agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,9 @@ srun --overlap --jobid=<vllm-job> --pty curl -s http://localhost:8000/v1/models
### 2. Submit the eval job

`scripts/conduct_slurm.sh` requests a CPU allocation, finds the vLLM node, and
runs `scripts/conduct.sh` pointed at it with `use_wandb=True`:
runs `scripts/conduct.sh` pointed at it with `use_wandb=True`. For sweeps across
task files, tasks, variations or several agents, use `launch_parallel_agents.py`
instead (below):

```bash
# smoke test (1 run)
Expand Down Expand Up @@ -291,6 +293,69 @@ srun --overlap --jobid=<vllm-job> \
./scripts/conduct.sh agent.hostname=localhost use_wandb=True
```

### 2b. Or launch a sweep

`launch_parallel_agents.py` is the one entry point for sweeps, locally and on
SLURM. The sweep is task files × agents × app variations × tasks × repeats, and
every job gets its own port window, `logs_dir` and databases.
`agent.hostname=auto` points the agents at the node serving their model (see
*Discovery* above); `agent.hostname=<node>` pins it instead.

**On SLURM, one job per run** (`mode=slurm_cluster`): the launcher submits the
sweep through submitit, one CPU job per run, with the `slurm_sweep_launcher`
settings from `config/mode/slurm_cluster.yaml`. Its account, QOS, partition and
`logs_dir` are placeholders; set them on the command line (or in your own copy
of that file). `logs_dir` must be on storage the compute nodes share.

```bash
uv run launch_parallel_agents.py mode=slurm_cluster \
logs_dir=/shared/$USER/logs/open_apps \
slurm_sweep_launcher.slurm_account=... \
slurm_sweep_launcher.slurm_qos=... \
slurm_sweep_launcher.slurm_partition=... \
agents=gemma-4-31B-computer-use agent.hostname=auto \
'parallel_tasks.task_names=[add_meeting_with_dennis]' 'parallel_tasks.app_variations=[[]]'
```

**Inside one allocation** (`mode=local`): run the sweep from a single CPU
allocation, `max_parallel` runs at a time, each writing to its
`<logs_dir>/run-<id>/<job_id>/run.log`:

```bash
srun --account=... --qos=... --partition=... --cpus-per-task=8 --mem=40G --time=400 \
uv run launch_parallel_agents.py mode=local max_parallel=8 \
agents=gemma-4-31B-computer-use agent.hostname=auto tasks=longer_horizon.yaml \
parallel_tasks.repeats=3 browsergym_env_args.max_steps=40
```

- `agent.hostname=auto` lists your running jobs (`squeue --me`), expands their
nodelists and probes `http://<node>:<agent.port>/v1/models` (port 8000 by
default, with `agent.api_key` if the server needs one) for the agent's
`model_name`. Every job of one model goes to the node found for it.
- With `use_wandb=True`, a sweep's runs share one W&B group (the `run-<id>`
name) with the agent as `job_type`.

**Check the pipeline first with the dummy agent** (no model server):

```bash
# locally: 2 tasks x 2 variations, 2 at a time
uv run launch_parallel_agents.py agent=dummy max_parallel=2 browsergym_env_args.max_steps=3 \
'parallel_tasks.task_names=[add_call_mom_to_my_todo,message_bob_to_meet]' \
'parallel_tasks.app_variations=[[],["apps/theme=dark"]]'

# on SLURM: the same sweep, one job per run
uv run launch_parallel_agents.py mode=slurm_cluster agent=dummy browsergym_env_args.max_steps=3 \
logs_dir=/shared/$USER/logs/open_apps \
slurm_sweep_launcher.slurm_account=... slurm_sweep_launcher.slurm_qos=... \
slurm_sweep_launcher.slurm_partition=... \
'parallel_tasks.task_names=[add_call_mom_to_my_todo,message_bob_to_meet]' \
'parallel_tasks.app_variations=[[],["apps/theme=dark"]]'
```

The SLURM sweep prints the submitted job ids; submitit's logs are in
`<logs_dir>/run-<id>/slurm/`, and each run's `summary_info.json` is under
`<logs_dir>/run-<id>/<job_id>/`.

### 3. Check results

- SLURM log: `slurm-<jobid>.out` — confirm discovery selected the vLLM node and
Expand Down
Loading
Loading