"megatron/data/biencoder_dataset_utils.py" did not exist on "fcc500d6e19d2c03f0e2e45f4c9c5b01c1577b11"
hpo_comparison.rst 8.25 KB
Newer Older
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
Hyper Parameter Optimization Comparison
=======================================

*Posted by Anonymous Author*

Comparison of Hyperparameter Optimization (HPO) algorithms on several problems.

Hyperparameter Optimization algorithms are list below:


* `Random Search <../Tuner/BuiltinTuner.rst>`__
* `Grid Search <../Tuner/BuiltinTuner.rst>`__
* `Evolution <../Tuner/BuiltinTuner.rst>`__
* `Anneal <../Tuner/BuiltinTuner.rst>`__
* `Metis <../Tuner/BuiltinTuner.rst>`__
* `TPE <../Tuner/BuiltinTuner.rst>`__
* `SMAC <../Tuner/BuiltinTuner.rst>`__
* `HyperBand <../Tuner/BuiltinTuner.rst>`__
* `BOHB <../Tuner/BuiltinTuner.rst>`__

All algorithms run in NNI local environment.

Machine Environment:

.. code-block:: bash

   OS: Linux Ubuntu 16.04 LTS
   CPU: Intel(R) Xeon(R) CPU E5-2690 v3 @ 2.60GHz 2600 MHz
   Memory: 112 GB
   NNI Version: v0.7
   NNI Mode(local|pai|remote): local
   Python version: 3.6
   Is conda or virtualenv used?: Conda
   is running in docker?: no

AutoGBDT Example
----------------

Problem Description
^^^^^^^^^^^^^^^^^^^

Nonconvex problem on the hyper-parameter search of `AutoGBDT <../TrialExample/GbdtExample.rst>`__ example.

Search Space
^^^^^^^^^^^^

.. code-block:: json

   {
     "num_leaves": {
       "_type": "choice",
       "_value": [10, 12, 14, 16, 18, 20, 22, 24, 28, 32, 48, 64, 96, 128]
     },
     "learning_rate": {
       "_type": "choice",
       "_value": [0.00001, 0.0001, 0.001, 0.01, 0.05, 0.1, 0.2, 0.5]
     },
     "max_depth": {
       "_type": "choice",
       "_value": [-1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 28, 32, 48, 64, 96, 128]
     },
     "feature_fraction": {
       "_type": "choice",
       "_value": [0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2]
     },
     "bagging_fraction": {
       "_type": "choice",
       "_value": [0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2]
     },
     "bagging_freq": {
       "_type": "choice",
       "_value": [1, 2, 4, 8, 10, 12, 14, 16]
     }
   }

The total search space is 1,204,224, we set the number of maximum trial to 1000. The time limitation is 48 hours.

Results
^^^^^^^

.. list-table::
   :header-rows: 1
   :widths: auto

   * - Algorithm
     - Best loss
     - Average of Best 5 Losses
     - Average of Best 10 Losses
   * - Random Search
     - 0.418854
     - 0.420352
     - 0.421553
   * - Random Search
     - 0.417364
     - 0.420024
     - 0.420997
   * - Random Search
     - 0.417861
     - 0.419744
     - 0.420642
   * - Grid Search
     - 0.498166
     - 0.498166
     - 0.498166
   * - Evolution
     - 0.409887
     - 0.409887
     - 0.409887
   * - Evolution
     - 0.413620
     - 0.413875
     - 0.414067
   * - Evolution
     - 0.409887
     - 0.409887
     - 0.409887
   * - Anneal
     - 0.414877
     - 0.417289
     - 0.418281
   * - Anneal
     - 0.409887
     - 0.409887
     - 0.410118
   * - Anneal
     - 0.413683
     - 0.416949
     - 0.417537
   * - Metis
     - 0.416273
     - 0.420411
     - 0.422380
   * - Metis
     - 0.420262
     - 0.423175
     - 0.424816
   * - Metis
     - 0.421027
     - 0.424172
     - 0.425714
   * - TPE
     - 0.414478
     - 0.414478
     - 0.414478
   * - TPE
     - 0.415077
     - 0.417986
     - 0.418797
   * - TPE
     - 0.415077
     - 0.417009
     - 0.418053
   * - SMAC
     - **0.408386**
     - **0.408386**
     - **0.408386**
   * - SMAC
     - 0.414012
     - 0.414012
     - 0.414012
   * - SMAC
     - **0.408386**
     - **0.408386**
     - **0.408386**
   * - BOHB
     - 0.410464
     - 0.415319
     - 0.417755
   * - BOHB
     - 0.418995
     - 0.420268
     - 0.422604
   * - BOHB
     - 0.415149
     - 0.418072
     - 0.418932
   * - HyperBand
     - 0.414065
     - 0.415222
     - 0.417628
   * - HyperBand
     - 0.416807
     - 0.417549
     - 0.418828
   * - HyperBand
     - 0.415550
     - 0.415977
     - 0.417186
   * - GP
     - 0.414353
     - 0.418563
     - 0.420263
   * - GP
     - 0.414395
     - 0.418006
     - 0.420431
   * - GP
     - 0.412943
     - 0.416566
     - 0.418443


In this example, all the algorithms are used with default parameters. For Metis, there are about 300 trials because it runs slowly due to its high time complexity O(n^3) in Gaussian Process.

RocksDB Benchmark 'fillrandom' and 'readrandom'
-----------------------------------------------

Problem Description
^^^^^^^^^^^^^^^^^^^

`DB_Bench <https://github.com/facebook/rocksdb/wiki/Benchmarking-tools>`__ is the main tool that is used to benchmark `RocksDB <https://rocksdb.org/>`__\ 's performance. It has so many hapermeter to tune.

The performance of ``DB_Bench`` is associated with the machine configuration and installation method. We run the ``DB_Bench``\ in the Linux machine and install the Rock in shared library.

Machine configuration
^^^^^^^^^^^^^^^^^^^^^

.. code-block:: bash

   RocksDB:    version 6.1
   CPU:        6 * Intel(R) Xeon(R) CPU E5-2690 v4 @ 2.60GHz
   CPUCache:   35840 KB
   Keys:       16 bytes each
   Values:     100 bytes each (50 bytes after compression)
   Entries:    1000000

Storage performance
^^^^^^^^^^^^^^^^^^^

**Latency**\ : each IO request will take some time to complete, this is called the average latency. There are several factors that would affect this time including network connection quality and hard disk IO performance.

232
**IOPS**\ : **IO operations per second**\ , which means the amount of *read or write operations* that could be done in one seconds time.
233

234
**IO size**\ : **the size of each IO request**. Depending on the operating system and the application/service that needs disk access it will issue a request to read or write a certain amount of data at the same time.
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385

**Throughput (in MB/s) = Average IO size x IOPS** 

IOPS is related to online processing ability and we use the IOPS as the metric in my experiment.

Search Space
^^^^^^^^^^^^

.. code-block:: json

   {
     "max_background_compactions": {
       "_type": "quniform",
       "_value": [1, 256, 1]
     },
     "block_size": {
       "_type": "quniform",
       "_value": [1, 500000, 1]
     },
     "write_buffer_size": {
       "_type": "quniform",
       "_value": [1, 130000000, 1]
     },
     "max_write_buffer_number": {
       "_type": "quniform",
       "_value": [1, 128, 1]
     },
     "min_write_buffer_number_to_merge": {
       "_type": "quniform",
       "_value": [1, 32, 1]
     },
     "level0_file_num_compaction_trigger": {
       "_type": "quniform",
       "_value": [1, 256, 1]
     },
     "level0_slowdown_writes_trigger": {
       "_type": "quniform",
       "_value": [1, 1024, 1]
     },
     "level0_stop_writes_trigger": {
       "_type": "quniform",
       "_value": [1, 1024, 1]
     },
     "cache_size": {
       "_type": "quniform",
       "_value": [1, 30000000, 1]
     },
     "compaction_readahead_size": {
       "_type": "quniform",
       "_value": [1, 30000000, 1]
     },
     "new_table_reader_for_compaction_inputs": {
       "_type": "randint",
       "_value": [1]
     }
   }

The search space is enormous (about 10^40) and we set the maximum number of trial to 100 to limit the computation resource.

Results
^^^^^^^

fillrandom' Benchmark
^^^^^^^^^^^^^^^^^^^^^

.. list-table::
   :header-rows: 1
   :widths: auto

   * - Model
     - Best IOPS (Repeat 1)
     - Best IOPS (Repeat 2)
     - Best IOPS (Repeat 3)
   * - Random
     - 449901
     - 427620
     - 477174
   * - Anneal
     - 461896
     - 467150
     - 437528
   * - Evolution
     - 436755
     - 389956
     - 389790
   * - TPE
     - 378346
     - 482316
     - 468989
   * - SMAC
     - 491067
     - 490472
     - **491136**
   * - Metis
     - 444920
     - 457060
     - 454438


Figure:


.. image:: ../../img/hpo_rocksdb_fillrandom.png
   :target: ../../img/hpo_rocksdb_fillrandom.png
   :alt: 


'readrandom' Benchmark
^^^^^^^^^^^^^^^^^^^^^^

.. list-table::
   :header-rows: 1
   :widths: auto

   * - Model
     - Best IOPS (Repeat 1)
     - Best IOPS (Repeat 2)
     - Best IOPS (Repeat 3)
   * - Random
     - 2276157
     - 2285301
     - 2275142
   * - Anneal
     - 2286330
     - 2282229
     - 2284012
   * - Evolution
     - 2286524
     - 2283673
     - 2283558
   * - TPE
     - 2287366
     - 2282865
     - 2281891
   * - SMAC
     - 2270874
     - 2284904
     - 2282266
   * - Metis
     - **2287696**
     - 2283496
     - 2277701


Figure:


.. image:: ../../img/hpo_rocksdb_readrandom.png
   :target: ../../img/hpo_rocksdb_readrandom.png
   :alt: