BatchTuner.rst 1.38 KB
Newer Older
liuzhe-lz's avatar
liuzhe-lz committed
1
2
Batch Tuner
===========
3

4
Batch tuner allows users to simply provide several configurations (i.e., choices of hyper-parameters) for their trial code. After finishing all the configurations, the experiment is done. Batch tuner only supports the type ``choice`` in the `search space spec <../Tutorial/SearchSpaceSpec.rst>`__.
5

liuzhe-lz's avatar
liuzhe-lz committed
6
Suggested scenario: If the configurations you want to try have been decided, you can list them in the SearchSpace file (using ``choice``) and run them using the batch tuner.
ChrisZRen's avatar
ChrisZRen committed
7

8
9
Usage
-----
ChrisZRen's avatar
ChrisZRen committed
10
11
12
13
14
15
16
17

Example Configuration
^^^^^^^^^^^^^^^^^^^^^

.. code-block:: yaml

   # config.yml
   tuner:
18
     name: BatchTuner
ChrisZRen's avatar
ChrisZRen committed
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

Note that the search space for BatchTuner should look like:

.. code-block:: json

   {
       "combine_params":
       {
           "_type" : "choice",
           "_value" : [{"optimizer": "Adam", "learning_rate": 0.00001},
                       {"optimizer": "Adam", "learning_rate": 0.0001},
                       {"optimizer": "Adam", "learning_rate": 0.001},
                       {"optimizer": "SGD", "learning_rate": 0.01},
                       {"optimizer": "SGD", "learning_rate": 0.005},
                       {"optimizer": "SGD", "learning_rate": 0.0002}]
       }
   }

37
The search space file should include the high-level key ``combine_params``. The type of params in the search space must be ``choice`` and the ``values`` must include all the combined params values.