File size: 3,179 Bytes
fb9a0d9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0627689
 
 
fb9a0d9
 
 
 
 
 
0627689
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
defaults:
  - _self_
  - /callbacks: [checkpoint_every_n_steps, checkpoint_monitor, learning_rate_monitor]
  - /lr_scheduler: constant_warmup
  - /strategy: ddp
  - /model: dimamba # dnaconv / dimamba / dnaddit
  - /noise: cosine
  - /guidance: cfg # for CFG
  
mode: train  
diffusion: absorbing_state
parameterization: subs 
time_conditioning: True
T: 0  # 0 (continuous time)
subs_masking: False
debug_mode: False
seed: 1

data:
  path: data/processed/human_mouse_enhancers_variable_len_class_homologous_splits_combined_classes.csv
  streaming: False

loader:
  global_batch_size: 4096
  eval_global_batch_size: ${.global_batch_size}
  batch_size: ${div_up:${.global_batch_size}, ${world_size:${trainer.devices},${trainer.num_nodes}}}
  eval_batch_size: ${div_up:${.eval_global_batch_size}, ${world_size:${trainer.devices},${trainer.num_nodes}}}
  num_workers: ${eval:"len(__import__('os').sched_getaffinity(0))"}
  pin_memory: True
  persistent_workers: False
  rc_aug: False
  max_length: 350
  truncation: True
  testing: False # subsample the dataset to 10% for quick testing

training:
  ema: 0.9999
  antithetic_sampling: True
  importance_sampling: False
  sampling_eps: 1e-3
  change_of_variables: False

eval:
  checkpoint_path: null  # Set by benchmark drivers from the workflow config.

optim:
  weight_decay: 0
  lr: 1e-3 
  beta1: 0.9
  beta2: 0.999
  eps: 1e-8

trainer:
  _target_: lightning.Trainer
  accelerator: cuda
  num_nodes: 1
  devices: ${device_count:}
  accumulate_grad_batches: ${div_up:${loader.global_batch_size}, ${eval:${world_size:${trainer.devices},${trainer.num_nodes}} * ${loader.batch_size}}}
  gradient_clip_val: 1.0
  precision: 16-mixed
  num_sanity_val_steps: 2
  max_steps: 100000
  #max_epochs: 150 
  log_every_n_steps: 10
  limit_train_batches: 1.0   # train on full dataset, can be used to toggle quick run
  limit_val_batches: 1.0     # validate on full dataset, can be used to toggle quick run
  val_check_interval: 1.0
  

wandb:
  project: DNA-CRAFT
  notes: model_training 
  group: 
  job_type: null
  name: 2M_${noise.type}_${model.type}_lr${optim.lr}_bs${loader.global_batch_size}_cfg${guidance.cfg}_type_${guidance.type}_seed${seed} # name the job based
  tags:
    - ${noise.type}
    - ${model.type}

# set up project specific paths
hydra:
  run:
    dir: ${repo_root:}/trained_models/2M_${noise.type}_${model.type}_lr${optim.lr}_bs${loader.global_batch_size}_cfg${guidance.cfg}_type_${guidance.type}_seed${seed}
  job:
    chdir: True

checkpointing:
  save_dir: ${hydra:runtime.output_dir}
  resume_from_ckpt: False
  resume_ckpt_path: ${hydra:runtime.output_dir}/checkpoints/last.ckpt

sampling: 
  predictor: ddpm 
  steps: 32 
  noise_removal: True
  num_sample_batches: 2  # Total samples: `num_gpus` * `loader.eval_batch_size` * num_sample_batches
  num_sample_log: 2
  semi_ar: False
  stride_length: 1
  num_strides: 1
  num_sequences: 512
  sequence_length: 200

mcts: 
  num_children: 32 
  num_iter: 16 
  sample_prob: 0.5
  max_seqs: 64 
  reward_config: mean  # MCTS reward aggregation

smc:
  target_class: 0
  catlas: False
  reward_type: mingap_logsumexp
  catlas_on_indices: []
  catlas_off_indices: []