"test/ut/nas/test_nn.py" did not exist on "7eedec46aab3593d387376b56903a72ee3a3a08d"
BatchTuner.rst 1.44 KB
Newer Older
1
Batch Tuner on NNI
2
==================
3

4
5
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
Usage
-----
ChrisZRen's avatar
ChrisZRen committed
13
14
15
16
17
18
19
20

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

.. code-block:: yaml

   # config.yml
   tuner:
21
     name: BatchTuner
ChrisZRen's avatar
ChrisZRen committed
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41

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

42
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.