Skip to content

Guard against Hydra launcher overrides inside swept job configs #3231

Closed

Description

@omry

Problem

Hydra currently allows a swept job config to contain a defaults-list override for controller-level Hydra config, for example:

defaults:
  - override /hydra/launcher: joblib

When this config is selected as part of a multirun sweep, the override is applied only while composing the individual job config. By that point the multirun controller has already selected the launcher, so the override is too late to affect the actual launcher used for the sweep.

This can make the composed job config appear to select hydra/launcher=joblib while the multirun still runs with the already-selected launcher, such as basic.

Expected behavior

Hydra should not silently accept controller-level Hydra defaults-list overrides from swept job configs when they cannot affect the multirun controller. It should fail with a clear error explaining that launcher/sweeper selection for multirun must happen at the controller level, for example from the primary config or command line.

Notes

This came up while triaging #2946. Hydra already rejects directly sweeping over Hydra overrides in some cases, but this is a related guardrail gap: a config selected by the sweep can still try to override controller-level Hydra choices too late.

This is separate from #851, which tracks the broader feature request to use configured launchers for regular runs without requiring -m.

Activity

  1. added
    bugSomething isn't working
    on Jun 22, 2026
  2. added this to the Hydra 1.4.0 milestone on Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions