BatchTuner.rst 1.46 KB
Newer Older
1
Batch Tuner on NNI
2
==================
3

ChrisZRen's avatar
ChrisZRen committed
4
5
1. Introduction
---------------
6

7
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>`__.
8

9
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
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42

2. Usage
--------

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

.. code-block:: yaml

   # config.yml
   tuner:
     builtinTunerName: BatchTuner

:raw-html:`<br>`

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}]
       }
   }

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.