File size: 897 Bytes
ff88fc5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Hydra example Launcher plugin

This plugin provides an example for how to write a custom Sweeper for Hydra.
The provided example has a custom configuration for the sweeper that takes two parameters, foo and bar:
```yaml
hydra:
  sweeper:
    cls: hydra_plugins.example_sweeper.ExampleSweeper
    params:
      foo: 10
      bar: abcde
```

#### Example app using custom sweeper:
```text
$ python example/my_app.py -m db=mysql,postgresql
[2019-11-14 11:42:47,941][HYDRA] ExampleSweeper (foo=10, bar=abcde) sweeping
[2019-11-14 11:42:47,941][HYDRA] Sweep output dir : multirun/2019-11-14/11-42-47
[2019-11-14 11:42:47,942][HYDRA] Launching 2 jobs locally
[2019-11-14 11:42:47,942][HYDRA]        #0 : db=mysql
db:
  driver: mysql
  pass: secret
  user: omry

[2019-11-14 11:42:48,011][HYDRA]        #1 : db=postgresql
db:
  driver: postgresql
  pass: drowssap
  timeout: 10
  user: postgre_user
```