-
Notifications
You must be signed in to change notification settings - Fork 1
/
params.py
79 lines (60 loc) · 3.51 KB
/
params.py
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
import sys
def algo_params(param_str):
"""
Return params list based on param_str.
These are the parameters used to produce the figures in the paper
For AlphaX and Reinforcement Learning, we used the corresponding github repos:
https://github.com/linnanwang/AlphaX-NASBench101
https://github.com/automl/nas_benchmarks
"""
params = []
if param_str == 'test':
params.append({'algo_name':'random', 'total_queries':30})
params.append({'algo_name':'evolution', 'total_queries':30})
params.append({'algo_name':'bananas', 'total_queries':30})
params.append({'algo_name':'gp_bayesopt', 'total_queries':30})
params.append({'algo_name':'dngo', 'total_queries':30})
elif param_str == 'test_simple':
params.append({'algo_name':'random', 'total_queries':30})
params.append({'algo_name':'evolution', 'total_queries':30})
elif param_str == 'random':
params.append({'algo_name':'random', 'total_queries':10})
elif param_str == 'bananas':
params.append({'algo_name':'bananas', 'total_queries':150, 'verbose':0})
elif param_str == 'main_experiments':
params.append({'algo_name':'random', 'total_queries':150})
params.append({'algo_name':'evolution', 'total_queries':150})
params.append({'algo_name':'bananas', 'total_queries':150})
params.append({'algo_name':'gp_bayesopt', 'total_queries':150})
params.append({'algo_name':'dngo', 'total_queries':150})
elif param_str == 'ablation':
params.append({'algo_name':'bananas', 'total_queries':150})
params.append({'algo_name':'bananas', 'total_queries':150, 'encoding_type':'adjacency'})
params.append({'algo_name':'gp_bayesopt', 'total_queries':150, 'distance':'path_distance'})
params.append({'algo_name':'gp_bayesopt', 'total_queries':150, 'distance':'edit_distance'})
params.append({'algo_name':'bananas', 'total_queries':150, 'acq_opt_type':'random'})
else:
print('invalid algorithm params: {}'.format(param_str))
sys.exit()
print('\n* Running experiment: ' + param_str)
return params
def meta_neuralnet_params(param_str):
if param_str == 'nasbench':
params = {'search_space':'nasbench', 'dataset':'cifar10', 'loss':'mae', 'num_layers':10, 'layer_width':20, \
'epochs':150, 'batch_size':32, 'lr':.01, 'regularization':0, 'verbose':0}
elif param_str == 'darts':
params = {'search_space':'darts', 'dataset':'cifar10', 'loss':'mape', 'num_layers':10, 'layer_width':20, \
'epochs':10000, 'batch_size':32, 'lr':.00001, 'regularization':0, 'verbose':0}
elif param_str == 'nasbench_201_cifar10':
params = {'search_space':'nasbench_201', 'dataset':'cifar10', 'loss':'mae', 'num_layers':10, 'layer_width':20, \
'epochs':150, 'batch_size':32, 'lr':.01, 'regularization':0, 'verbose':0}
elif param_str == 'nasbench_201_cifar100':
params = {'search_space':'nasbench_201', 'dataset':'cifar100', 'loss':'mae', 'num_layers':10, 'layer_width':20, \
'epochs':150, 'batch_size':32, 'lr':.01, 'regularization':0, 'verbose':0}
elif param_str == 'nasbench_201_imagenet':
params = {'search_space':'nasbench_201', 'dataset':'ImageNet16-120', 'loss':'mae', 'num_layers':10, 'layer_width':20, \
'epochs':150, 'batch_size':32, 'lr':.01, 'regularization':0, 'verbose':0}
else:
print('invalid meta neural net params: {}'.format(param_str))
sys.exit()
return params