File size: 2,958 Bytes
e381a82
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
fix_seed: 0
checkpoints_every: 64
tensorboard_log: True
tqdm_progress_bar: False
result_path: ./results/stability/

resume:
  resume: False
  resume_path: /path/to/checkpoint.pth
  restart_optimizer: True
  handle_shape_missmatch: True

prot2token_model:
  compile_model: True
  positional_encoding_type: learned # absolute, learned
  protein_encoder:
    model_name:  facebook/esm2_t33_650M_UR50D # facebook/esm2_t33_650M_UR50D, facebook/esm2_t30_150M_UR50D, facebook/esm2_t12_35M_UR50D, facebook/esm2_t6_8M_UR50D, Rostlab/prot_t5_base_mt_uniref50
    max_len: 1024
    drop_positional_encoding: True
    quantization_4_bit: False # use with tune_embedding enabled
    tune_embedding: False
    fine_tune:
      enable: True
      last_layers_trainable: 6
    lora:
      enable: False
      r: 8
      lora_alpha: 32
      lora_dropout: 0.05
  molecule_encoder:
    enable: False
    model_name: gayane/BARTSmiles
    max_len: 128
    drop_positional_encoding: True
    tune_embedding: False
    fine_tune:
      enable: False
      last_layers_trainable: 2
  decoder:
    dimension: 640
    dim_feedforward: 1280
    num_heads: 8
    num_layers: 8
    max_len: 32
    activation_function: gelu

train_settings:
  skip: False
  data_path: /mnt/hdd8/mehdi/datasets/Joint_training/
  num_epochs: 48
  start_metric_epoch: 2
  shuffle: True
  loss: crossentropy # crossentropy or focal
  sample_weight: True
  task_weight: False
  mixed_precision: bf16 # no, fp16, bf16, fp8
  device: cuda
  batch_size: 16
  random_masking: 0.15 # 0 to 1.0
  num_workers: 0
  grad_accumulation: 32
  max_task_samples: 250000

valid_settings:
  data_path: /mnt/hdd8/mehdi/datasets/Joint_training/
  do_every: 1
  batch_size: 1
  num_workers: 0

test_settings:
  enable: True
  data_path: /mnt/hdd8/mehdi/datasets/Joint_training/
  batch_size: 1
  num_workers: 0
  monitoring_metrics:
    fluorescence: spearman
    stability: spearman
    protein_ligand_affinity: rmse
    human_ppi: f1
    structure_similarity: spearman
    protein_protein_interface: auc
    enzyme_reaction: f1
    fold: f1
    localization_deeploc: macro_f1
    secondary_structure: accuracy

optimizer:
  name: adam
  lr: 5e-5
  weight_decouple: True
  weight_decay: 1e-2
  eps: 1e-16
  beta_1: 0.9
  beta_2: 0.999
  use_8bit_adam: False
  grad_clip_norm: 1
  decay:
    warmup: 256
    min_lr: 1e-6
    gamma: 0.2
    num_restarts: 1

tasks:
  phosphorylation: False
  localization: False
  localization_deeploc: False
  fold: False
  enzyme_reaction: False
  human_ppi: False
  structure_similarity: False
  protein_protein_interface: False # decoder max length: 210
  protein_ligand_affinity: False
  fluorescence: False
  stability: True
  amino_to_fold_seek: False # decoder max length: max input length + 1
  secondary_structure: False # decoder max length: max input length + 1
  gene_ontology: False # decoder max length: 625
  enzyme_commission: False # decoder max length: 47
  auxiliary: False