-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmulti_seed_triplet_ap_vanilla_mine.py
61 lines (56 loc) · 3.66 KB
/
multi_seed_triplet_ap_vanilla_mine.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
from utils import common, configuration, triplet_methods
if __name__ == "__main__":
cfg_json_list = [
# "config/multi_seed_triplet_ap/vanilla_mine/amzn_nc3_s1.json",
# "config/multi_seed_triplet_ap/vanilla_mine/amzn_nc3_s2.json",
# "config/multi_seed_triplet_ap/vanilla_mine/amzn_nc3_s3.json",
# "config/multi_seed_triplet_ap/vanilla_mine/amzn_nc3_s4.json",
# "config/multi_seed_triplet_ap/vanilla_mine/covidclu_nc3_s1.json",
# "config/multi_seed_triplet_ap/vanilla_mine/covidclu_nc3_s2.json",
# "config/multi_seed_triplet_ap/vanilla_mine/covidclu_nc3_s3.json",
# "config/multi_seed_triplet_ap/vanilla_mine/covidclu_nc3_s4.json",
# "config/multi_seed_triplet_ap/vanilla_mine/fewrel_nc10_s1.json",
# "config/multi_seed_triplet_ap/vanilla_mine/fewrel_nc10_s2.json",
# "config/multi_seed_triplet_ap/vanilla_mine/fewrel_nc10_s3.json",
# "config/multi_seed_triplet_ap/vanilla_mine/fewrel_nc10_s4.json",
# "config/multi_seed_triplet_ap/vanilla_mine/huff_nc10_s1.json",
# "config/multi_seed_triplet_ap/vanilla_mine/huff_nc10_s2.json",
# "config/multi_seed_triplet_ap/vanilla_mine/huff_nc10_s3.json",
# "config/multi_seed_triplet_ap/vanilla_mine/huff_nc10_s4.json",
#
# "config/multi_seed_triplet_ap/vanilla_mine/fewrel_nc3_s0.json",
# "config/multi_seed_triplet_ap/vanilla_mine/fewrel_nc3_s1.json",
# "config/multi_seed_triplet_ap/vanilla_mine/fewrel_nc3_s2.json",
# "config/multi_seed_triplet_ap/vanilla_mine/fewrel_nc3_s3.json",
# "config/multi_seed_triplet_ap/vanilla_mine/fewrel_nc3_s4.json",
# "config/multi_seed_triplet_ap/vanilla_mine/fewrel_nc5_s0.json",
# "config/multi_seed_triplet_ap/vanilla_mine/fewrel_nc5_s1.json",
# "config/multi_seed_triplet_ap/vanilla_mine/fewrel_nc5_s2.json",
# "config/multi_seed_triplet_ap/vanilla_mine/fewrel_nc5_s3.json",
# "config/multi_seed_triplet_ap/vanilla_mine/fewrel_nc5_s4.json",
# "config/multi_seed_triplet_ap/vanilla_mine/fewrel_nc20_s0.json",
# "config/multi_seed_triplet_ap/vanilla_mine/fewrel_nc20_s1.json",
# "config/multi_seed_triplet_ap/vanilla_mine/fewrel_nc20_s2.json",
# "config/multi_seed_triplet_ap/vanilla_mine/fewrel_nc20_s3.json",
# "config/multi_seed_triplet_ap/vanilla_mine/fewrel_nc20_s4.json",
#
# "config/multi_seed_triplet_ap/vanilla_mine/huff_nc3_s0.json",
# "config/multi_seed_triplet_ap/vanilla_mine/huff_nc3_s1.json",
# "config/multi_seed_triplet_ap/vanilla_mine/huff_nc3_s2.json",
# "config/multi_seed_triplet_ap/vanilla_mine/huff_nc3_s3.json",
# "config/multi_seed_triplet_ap/vanilla_mine/huff_nc3_s4.json",
# "config/multi_seed_triplet_ap/vanilla_mine/huff_nc5_s0.json",
# "config/multi_seed_triplet_ap/vanilla_mine/huff_nc5_s1.json",
# "config/multi_seed_triplet_ap/vanilla_mine/huff_nc5_s2.json",
# "config/multi_seed_triplet_ap/vanilla_mine/huff_nc5_s3.json",
# "config/multi_seed_triplet_ap/vanilla_mine/huff_nc5_s4.json",
# "config/multi_seed_triplet_ap/vanilla_mine/huff_nc20_s0.json",
# "config/multi_seed_triplet_ap/vanilla_mine/huff_nc20_s1.json",
# "config/multi_seed_triplet_ap/vanilla_mine/huff_nc20_s2.json",
# "config/multi_seed_triplet_ap/vanilla_mine/huff_nc20_s3.json",
# "config/multi_seed_triplet_ap/vanilla_mine/huff_nc20_s4.json",
]
for cfg_json in cfg_json_list:
cfg = configuration.triplet_ap_config.from_json(cfg_json); print(f"config from {cfg_json}")
common.set_random_seed(cfg.seed_num)
triplet_methods.train_eval_model(cfg)