Skip to content

[Fix] Keep command-line overrides in every parallel run - #90

Merged
aaronsmulktis merged 4 commits into
mainfrom
aaronsmulktis/parallel-compose-overrides
Oct 19, 2026
Merged

aaronsmulktis merged 4 commits into
mainfrom
aaronsmulktis/parallel-compose-overrides

Conversation

@aaronsmulktis

Copy link
Copy Markdown
Contributor

Why this PR?

launch_parallel_agents.py silently dropped any command-line override under apps.*. apps.todo.title=X reached the parent config, but every run in the sweep came out with the default title. apps.onlineshop.enable=True, a theme field, or any per-app setting passed on the command line was lost the same way, with no error.

AppVariationParallelTasksConfig.create_configs copied the parent config and swapped in an apps subtree composed from the variation alone, without the command-line overrides. Overrides outside apps (like browsergym_env_args.max_steps) survived only because that subtree wasn't replaced.

This is step 1 of making launch_parallel_agents.py the single sweep engine (agents × variations × tasks × repeats, plus local concurrency) so conduct.sh can be retired. An agents axis has to replace more subtrees (agent, browsergym_env_args, device), so composition has to be right first.

What changes

  • create_configs composes each run from scratch: the command-line overrides, then the run's app variation, then task_name. The variation comes last, so it wins over a command-line value for the same key. Hydra allows the repeat and keeps the last value, including for config groups.
  • launch_parallel_agents.py passes the overrides (HydraConfig.get().overrides.task) and the root config name.
  • logs_dir, databases_dir and record_video_dir still come from the parent, copied unresolved. The launcher has already settled them: record_video_dir is pinned to an absolute path by freeze_recording_dir. ${now:…} isn't cached, so a fresh compose would give each run its own timestamp. Unresolved, a SLURM logs_dir with ${job_id} still resolves per job.

Test plan

  • New TestCommandLineOverridesReachEveryRun composes for real, with no stub:
    • an apps.todo.title override reaches every run;
    • max_steps survives;
    • the dark-theme variation applies only to its runs;
    • record_video_dir and the raw logs_dir come from the parent.
  • The create_configs stub now returns a fresh config per call, because create_configs keeps and edits each composed config. 14/14 in test_parallel_tasks.py.
  • End-to-end, macOS: uv run launch_parallel_agents.py agent=dummy 'apps.todo.title=From the CLI' 'parallel_tasks.task_names=[navigate_to_todo]'. Both jobs' saved config.yaml have apps.todo.title = From the CLI; job 1 has the dark theme from its variation. (Chromium couldn't launch in the sandbox this ran in, so the agent episodes themselves didn't run. Config composition happens before that.)
  • Ruff: no new findings.

create_configs copied the parent config and swapped in a freshly composed apps subtree, composed without the command-line overrides. Any override under apps.* reached the parent and silently vanished from every run: apps.todo.title=X came out as the default in each job. Compose each run from the command-line overrides plus its variation instead (variation last, so it wins), and take logs_dir, databases_dir and record_video_dir from the parent unresolved, since the launcher has already settled them and ${now} is not cached.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 15, 2026

@marksibrahim marksibrahim left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this Aaron, definitely want command line overrides to be passed. This looks great

@aaronsmulktis aaronsmulktis self-assigned this Oct 19, 2026
@aaronsmulktis
aaronsmulktis merged commit 8009191 into main Oct 19, 2026
6 checks passed
@aaronsmulktis
aaronsmulktis deleted the aaronsmulktis/parallel-compose-overrides branch October 19, 2026 17:45
aaronsmulktis added a commit that referenced this pull request Oct 20, 2026
Brings in #88, #90 (parallel runs recompose each cell and keep CLI
overrides) and #86 (shop orders paid with an OpenBanking card; the bank
records charges, overlimit notices and declines; vLLM hostname fail-fast).

Conflict: config/apps/openbanking/default.yaml -- kept #86's payment
block (overlimit_grace, as_of_date) and the alignment irreversible block
below it, unchanged; the follow-up commit reworks that map for the bank's
new write path.

vLLM_agent.py merged cleanly: #86 changed ModelArgs.make_model (hostname
check), this branch wraps the chat call in VLLMAgent.get_action with the
token tracker; the two do not overlap.
aaronsmulktis added a commit that referenced this pull request Oct 20, 2026
Brings in upstream main (#86, #88, #90) through alignment-core, and core's
follow-up that scores OpenBanking card purchases.

Conflict: src/open_apps/launcher.py -- kept this branch's
_success_summary loop (ambiguity tasks take success from the scorer) and
added #86's errored / err_msg / stack_trace summary after it.

No event in config/apps/events touches the shop or the bank, so the
predicates need no change for #86.
aaronsmulktis added a commit that referenced this pull request Oct 20, 2026
Brings in upstream main (#86, #88, #90) through alignment-core and
alignment-events.

Conflicts:
- src/open_apps/tasks/parallel_tasks.py -- took #90's version. Composing
  each run whole from the command line plus its cell carries a cell's
  root-level `device=` by construction, so this branch's
  _is_device_override copy of the node is dropped.
- tests/test_parallel_tasks.py -- kept #90's
  TestCommandLineOverridesReachEveryRun and this branch's
  TestDeviceInCells (docstring updated): #90's tests pin apps.* and other
  overrides but not a root-level group, and align_v1's phone cells rely on
  that.
- docs/tasks.md -- kept both new sections (Ambiguity Tasks, Cross-app
  purchase tasks).
aaronsmulktis added a commit that referenced this pull request Oct 20, 2026
…line cell axes

#90 composes every run whole from the command line plus its cell, instead
of copying the parent and swapping in `apps`. SuiteParallelTasksConfig
already forwarded *args/**kwargs to the per-block fan-out, so
launch_parallel_agents' cli_overrides / config_name reach it unchanged and
each run now carries `benchmark=<suite>` (protocol, max_steps,
suite_version) from its own compose; seeds are still applied per run.

One consequence for a frozen suite: an `apps.*` or `device=` override on
the command line used to be dropped silently and now reaches every cell,
where validate cannot see it (a record names its cell, not its command
line). create_configs refuses those with a message; agent=, mode=,
use_wandb= and the like still pass.

Tests: a real fan-out over three align_v1 cells x two seeds (reference,
device=phone, an events cell) checks the protocol, device and events per
run and that each run's `apps` equals the reference's `config` + cell
compose -- verified separately for all 13 align_v1 variations. The
stubbed fan-out test no longer asserts suite_version, which now comes from
the compose it stubs. The reference-vs-sweep-job test passes the command
line to create_configs the way the launcher does.
@aaronsmulktis
aaronsmulktis restored the aaronsmulktis/parallel-compose-overrides branch October 29, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants