File size: 1,591 Bytes
29899b4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41553a7
 
4c4b1fc
 
 
 
29899b4
41553a7
7b33404
9da03b7
 
 
c237769
 
4c4b1fc
7b33404
9da03b7
7b33404
c237769
41553a7
7b33404
9da03b7
121a325
29899b4
 
4c4b1fc
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
#!/bin/bash

# Manually specify values used in the config
main_task="train"
model_type="classifier"
timestamp=$(date "+%Y-%m-%d_%H-%M-%S")

run_dir="$HOME/DPACMAN/logs/${main_task}/${model_type}/runs/${timestamp}"
mkdir -p "$run_dir"

if [ -z "$WANDB_API_KEY" ]; then
    read -s -p "Enter your WANDB API key: " wandb_key
    echo
    export WANDB_API_KEY="$wandb_key"
fi

CUDA_VISIBLE_DEVICES=0,1 nohup python -u -m scripts.train \
  +trainer.strategy=ddp \
  +trainer.use_distributed_sampler="false" \
  +trainer.detect_anomaly="false" \
  +trainer.gradient_clip_val=0.5 \
  +trainer.gradient_clip_algorithm="norm" \
  hydra.run.dir="${run_dir}" \
  trainer.devices=2 \
  trainer.max_epochs=10 \
  data_module.train_file="/home/a03-svincoff/DPACMAN/dpacman/data_files/processed/splits/handpicked_val_test_cropTR4/train.csv" \
  data_module.val_file="/home/a03-svincoff/DPACMAN/dpacman/data_files/processed/splits/handpicked_val_test_cropTR4/val.csv" \
  data_module.test_file="/home/a03-svincoff/DPACMAN/dpacman/data_files/processed/splits/handpicked_val_test_cropTR4/test.csv" \
  data_module.tr_shelf_path="data_files/processed/embeddings/fimo_hits_only/trs_esm.shelf" \
  data_module.dna_shelf_path="data_files/processed/embeddings/fimo_hits_only/peaks_caduceus.shelf" \
  data_module.batch_size=16 \
  data_module.score_col="binary_scores" \
  data_module.norm_value=1 \
  model.loss_type="binary" \
  model.glm_input_dim=256 \
  model.compressed_dim=256 \
  model.hidden_dim=256 \
  model.dropout=0.2 \
  model.lr=1e-5 \
  > "${run_dir}/run.log" 2>&1 &

echo $! > "${run_dir}/pid.txt"