-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig_roberta.json
69 lines (65 loc) · 1.64 KB
/
config_roberta.json
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
{
"name": "RoBERTawithDBL",
"n_gpu": 1,
"arch": {
"type": "RoBERTaDiseaseClassifier",
"args": {
"num_symps" : 38
}
},
"data_loader": {
"type": "MultiDiseaseDataLoader",
"args":{
"data_dir": "data/without_control/",
"tokenizer_type" : "roberta-base",
"batch_size": 64,
"shuffle": true,
"split" : "train",
"bal_sample" : false,
"control_ratio" : 0,
"max_len" : 64,
"uncertain" : "exclude",
"num_workers": 2
}
},
"valid_data_loader": {
"type": "MultiDiseaseDataLoader",
"args":{
"data_dir": "data/without_control/",
"tokenizer_type" : "roberta-base",
"batch_size": 64,
"shuffle": false,
"split" : "val",
"bal_sample" : false,
"control_ratio" : 0,
"max_len" : 64,
"uncertain" : "exclude",
"num_workers": 2
}
},
"optimizer": {
"type": "AdamW",
"args":{
"lr": 2e-5,
"weight_decay": 1e-6
}
},
"loss": {
"name":"distirbution_balanced_loss",
"contrastive":false,
"contrastive_gamma":1e-5
},
"metrics": {
"target" : ["auc", "accuracy", "precision", "recall", "f1_score"],
"threshold" : 0.5
},
"trainer": {
"epochs": 30,
"save_dir": "saved/",
"save_period": 1,
"verbosity": 2,
"monitor": "max val_macro_auc",
"early_stop": 3,
"tensorboard": true
}
}