Skip to main content
Version: 1.1


Sometimes you want to run the same application with multiple different configurations.
E.g. running a performance test on each of the databases with each of the schemas.

Use the --multirun (-m) flag and pass a comma separated list specifying the values for each dimension you want to sweep.

The following sweeps over all combinations of the dbs and schemas.

$ python -m db=mysql,postgresql schema=warehouse,support,school
[2021-01-20 17:25:03,317][HYDRA] Launching 6 jobs locally
[2021-01-20 17:25:03,318][HYDRA] #0 : db=mysql schema=warehouse
[2021-01-20 17:25:03,458][HYDRA] #1 : db=mysql schema=support
[2021-01-20 17:25:03,602][HYDRA] #2 : db=mysql schema=school
[2021-01-20 17:25:03,755][HYDRA] #3 : db=postgresql schema=warehouse
[2021-01-20 17:25:03,895][HYDRA] #4 : db=postgresql schema=support
[2021-01-20 17:25:04,040][HYDRA] #5 : db=postgresql schema=school

The printed configurations have been omitted for brevity.

Additional sweep types#

Hydra supports other kinds of sweeps, e.g:

x=range(1,10) # 1-9
schema=glob(*) # warehouse,support,school
schema=glob(*,exclude=w*) # support,school

See the Extended Override syntax for details.


The default sweeping logic is built into Hydra. Additional sweepers are available as plugins. For example, the Ax Sweeper can automatically find the best parameter combination!


By default, Hydra runs your multi-run jobs locally and serially. Other launchers are available as plugins for launching in parallel and on different clusters. For example, the JobLib Launcher can execute the different parameter combinations in parallel on your local machine using multi-processing.

Last updated on by Jasha10