-
Notifications
You must be signed in to change notification settings - Fork 0
/
nni_exp_exchange_rate_96.py
42 lines (39 loc) · 2.3 KB
/
nni_exp_exchange_rate_96.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
from nni.experiment import Experiment
# g和f的hidden_state
# search_space = {
# 'learning_rate': {'_type': 'choice', '_value': [5e-5,1e-5]},
# # 'likelihoods_learning_rate': {'_type': 'choice', '_value': [1e-5, 5e-5, 1e-6]},
# 'lambda_sparse':{'_type': 'choice', '_value': [5,10,15]},
# "warm_up_step":{'_type': 'choice', '_value': [200]},
# "reduce_lr_step":{'_type': 'choice', '_value': [20]},
# 'log_scale_init':{'_type': 'choice', '_value': [-1.74]},
# 'pre_len': {'_type': 'choice', '_value': [192]},
# # 'pre_len': {'_type': 'choice', '_value': [192,336,720]},
# 'max_steps_auglag': {'_type': 'choice', '_value': [200]},
# 'batch_size': {'_type': 'choice', '_value': [64]}, # config文件中目前写的64
# # 'random_seed': {'_type': 'choice', '_value': [1,2,3,4,5,6]},
# }
search_space = {
'learning_rate': {'_type': 'choice', '_value': [1e-5, 5e-5, 1e-6]},
# 'likelihoods_learning_rate': {'_type': 'choice', '_value': [1e-5, 5e-5, 1e-6]},
'lambda_sparse':{'_type': 'choice', '_value': [0, 25, 100]},
"warm_up_step":{'_type': 'choice', '_value': [200,500]},
# "reduce_lr_step":{'_type': 'choice', '_value': [20]},
'log_scale_init':{'_type': 'choice', '_value': [-2.46]},
'pre_len': {'_type': 'choice', '_value': [96]},
'max_steps_auglag': {'_type': 'choice', '_value': [500]}, # config文件中目前写的2000
'batch_size': {'_type': 'choice', '_value': [64]}, # config文件中目前写的2000
}
experiment = Experiment('local')
experiment.config.trial_command = 'CUDA_VISIBLE_DEVICES=3 python -m causica.run_experiment exchange_rate --model_type rhino_informer -dc configs/dataset_config_temporal_causal_dataset_all.json --model_config configs/rhino/model_config_rhino_exchange_rate_gaussian_informer.json -dv gpu -i -ifc infer_config_temporal_causal_dataset.json'
experiment.config.trial_code_directory = '.'
experiment.config.search_space = search_space
experiment.config.tuner.name = 'TPE'
experiment.config.tuner.class_args['optimize_mode'] = 'minimize'
#experiment.config.use_active_gpu=True
experiment.config.max_trial_number = 18
experiment.config.trial_concurrency = 5
#experiment.config.trial_gpu_number = 3
experiment.run(8086)
#experiment.stop()
input()