File size: 2,425 Bytes
f67524a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
seed: 1337
deterministic: false
gpu: 0
name: null
debug: false
load_model: ./models/supervised/v5vsimfr
distillation: false
data:
  dataset_path: explainable_medical_coding/datasets/augmented_inpatient_icd9_code.py
  target_columns:
  - diagnosis_codes
  - procedure_codes
  max_length: 6000
dataloader:
  max_batch_size: 8
  batch_size: 8
  num_workers: 0
  drop_last: false
  pin_memory: false
  batch_sampler:
    name: BySequenceLengthSampler
    configs:
      bucket_boundaries:
      - 400
      - 600
      - 800
      - 1000
      - 1200
      - 1400
      - 1600
      - 1800
      - 2000
      - 2200
      - 2600
      - 3000
      - 3400
      - 4000
      - 5000
model:
  name: PLMICD
  autoregressive: false
  configs:
    model_path: models/roberta-base-pm-m3-voc-hf
    chunk_size: 128
    cross_attention: true
    loss: binary_cross_entropy
    lambda_1: 0.0
    scale: 1
    mask_input: false
trainer:
  name: Trainer
  epochs: 20
  validate_on_training_data: true
  print_metrics: false
  use_amp: true
  threshold_tuning: true
  clip_grad_norm: 1
  clip_value: 10
optimizer:
  name: AdamW
  configs:
    lr: 5.0e-05
    weight_decay: 0
lr_scheduler:
  name: linear
  configs:
    warmup: 0.1
metrics:
- name: F1Score
  configs:
    average: micro
- name: F1Score
  configs:
    average: macro
- name: Recall
  configs:
    average: micro
- name: Recall
  configs:
    average: macro
- name: Precision
  configs:
    average: micro
- name: Precision
  configs:
    average: macro
- name: FPR
  configs:
    average: micro
- name: FPR
  configs:
    average: macro
- name: ExactMatchRatio
  configs: {}
- name: Precision_K
  configs:
    k: 5
- name: Precision_K
  configs:
    k: 8
- name: Precision_K
  configs:
    k: 15
- name: Recall_K
  configs:
    k: 5
- name: Recall_K
  configs:
    k: 10
- name: Recall_K
  configs:
    k: 15
- name: MeanAveragePrecision
  configs: {}
- name: PrecisionAtRecall
  configs: {}
- name: AUC
  configs:
    average: micro
- name: AUC
  configs:
    average: macro
- name: LossMetric
  configs: {}
callbacks:
- name: WandbCallback
  configs:
    project: explainable-medical-coding
    entity: null
- name: SaveBestModelCallback
  configs:
    split: validation
    target: all
    metric: map
- name: EarlyStoppingCallback
  configs:
    split: validation
    target: all
    metric: map
    patience: 3
loss:
  name: kl_attention_loss
  configs:
    lambda_1: 2.5