Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* update readme in ga_squad

* update readme

* fix typo

* Update README.md

* Update README.md

* Update README.md

* update readme

* update

* fix path

* update reference

* fix bug in config file

* update nni_arch_overview.png

* update

* update

* update

* update home page

* fix issue: microsoft#902, random parameter

* update doc about random

* change Random tuner test

* update metric_test for Random tuner

* update random config in test

* update Evolution_SQuAD doc
  • Loading branch information
xuehui1991 authored Mar 27, 2019
1 parent 7d7387c commit bfd99ad
Show file tree
Hide file tree
Showing 13 changed files with 5 additions and 28 deletions.
6 changes: 0 additions & 6 deletions docs/en_US/Builtin_Tuner.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ Random search is suggested when each trial does not take too long (e.g., each tr
# config.yml
tuner:
builtinTunerName: Random
classArgs:
optimize_mode: maximize
```

<br>
Expand Down Expand Up @@ -115,10 +113,6 @@ tuner:

Its requirement of computation resource is relatively high. Specifically, it requires large initial population to avoid falling into local optimum. If your trial is short or leverages assessor, this tuner is a good choice. And, it is more suggested when your trial code supports weight transfer, that is, the trial could inherit the converged weights from its parent(s). This can greatly speed up the training progress.

**Requirement of classArg**

* **optimize_mode** (*maximize or minimize, optional, default = maximize*) - If 'maximize', tuners will return the hyperparameter set with larger expectation. If 'minimize', tuner will return the hyperparameter set with smaller expectation.

**Usage example**

```yaml
Expand Down
3 changes: 1 addition & 2 deletions docs/en_US/SQuAD_evolution_examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
This example shows us how to use Genetic Algorithm to find good model architectures for Reading Comprehension.

## 1. Search Space
Since attention and recurrent neural network (RNN) have been proven effective in Reading Comprehension.
We conclude the search space as follow:
Since attention and RNN have been proven effective in Reading Comprehension, we conclude the search space as follow:

1. IDENTITY (Effectively means keep training).
2. INSERT-RNN-LAYER (Inserts a LSTM. Comparing the performance of GRU and LSTM in our experiment, we decided to use LSTM here.)
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/pynni/nni/hyperopt_tuner/hyperopt_tuner.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class HyperoptTuner(Tuner):
HyperoptTuner is a tuner which using hyperopt algorithm.
"""

def __init__(self, algorithm_name, optimize_mode):
def __init__(self, algorithm_name, optimize_mode = 'minimize'):
"""
Parameters
----------
Expand Down
2 changes: 0 additions & 2 deletions test/config_test/examples/cifar10-pytorch.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ searchSpacePath: ./cifar10_search_space.json

tuner:
builtinTunerName: Random
classArgs:
optimize_mode: maximize
assessor:
builtinAssessorName: Medianstop
classArgs:
Expand Down
2 changes: 0 additions & 2 deletions test/config_test/examples/mnist-annotation.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ trialConcurrency: 2

tuner:
builtinTunerName: Random
classArgs:
optimize_mode: maximize
assessor:
builtinAssessorName: Medianstop
classArgs:
Expand Down
2 changes: 0 additions & 2 deletions test/config_test/examples/mnist-keras.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ searchSpacePath: ../../../examples/trials/mnist-keras/search_space.json

tuner:
builtinTunerName: Random
classArgs:
optimize_mode: maximize
assessor:
builtinAssessorName: Medianstop
classArgs:
Expand Down
2 changes: 0 additions & 2 deletions test/config_test/examples/mnist.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ searchSpacePath: ./mnist_search_space.json

tuner:
builtinTunerName: Random
classArgs:
optimize_mode: maximize
assessor:
builtinAssessorName: Medianstop
classArgs:
Expand Down
2 changes: 0 additions & 2 deletions test/config_test/examples/sklearn-classification.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ searchSpacePath: ../../../examples/trials/sklearn/classification/search_space.js

tuner:
builtinTunerName: Random
classArgs:
optimize_mode: maximize
assessor:
builtinAssessorName: Medianstop
classArgs:
Expand Down
2 changes: 0 additions & 2 deletions test/config_test/examples/sklearn-regression.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ searchSpacePath: ../../../examples/trials/sklearn/regression/search_space.json

tuner:
builtinTunerName: Random
classArgs:
optimize_mode: maximize
assessor:
builtinAssessorName: Medianstop
classArgs:
Expand Down
2 changes: 0 additions & 2 deletions test/config_test/tuners/mnist-annotation-random.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ trialConcurrency: 1

tuner:
builtinTunerName: Random
classArgs:
optimize_mode: maximize
assessor:
builtinAssessorName: Medianstop
classArgs:
Expand Down
2 changes: 0 additions & 2 deletions test/metrics_test/metrics.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ searchSpacePath: ./search_space.json

tuner:
builtinTunerName: Random
classArgs:
optimize_mode: maximize

trial:
codeDir: .
Expand Down
2 changes: 1 addition & 1 deletion test/tuner_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def switch(dispatch_type, dispatch_name):
'''Change dispatch in config.yml'''
config_path = 'tuner_test/local.yml'
experiment_config = get_yml_content(config_path)
if dispatch_name in ['GridSearch', 'BatchTuner']:
if dispatch_name in ['GridSearch', 'BatchTuner', 'Random']:
experiment_config[dispatch_type.lower()] = {
'builtin' + dispatch_type + 'Name': dispatch_name
}
Expand Down
4 changes: 2 additions & 2 deletions tools/nni_cmd/config_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@
Optional('gpuNum'): And(int, lambda x: 0 <= x <= 99999),
}),
Optional('tuner'): Or({
'builtinTunerName': Or('TPE', 'Random', 'Anneal', 'SMAC', 'Evolution'),
'builtinTunerName': Or('TPE', 'Anneal', 'SMAC', 'Evolution'),
Optional('classArgs'): {
'optimize_mode': Or('maximize', 'minimize')
},
Optional('includeIntermediateResults'): bool,
Optional('gpuNum'): And(int, lambda x: 0 <= x <= 99999),
},{
'builtinTunerName': Or('BatchTuner', 'GridSearch'),
'builtinTunerName': Or('BatchTuner', 'GridSearch', 'Random'),
Optional('gpuNum'): And(int, lambda x: 0 <= x <= 99999),
},{
'builtinTunerName': 'NetworkMorphism',
Expand Down

0 comments on commit bfd99ad

Please sign in to comment.