File size: 1,418 Bytes
121a325 7b33404 121a325 7b33404 9da03b7 121a325 | 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="baseline"
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=2,3 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="data_files/processed/splits/by_dna/train.csv" \
data_module.val_file="data_files/processed/splits/by_dna/val.csv" \
data_module.test_file="data_files/processed/splits/by_dna/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" \
model.loss_type="binary" \
data_module.norm_value=1 \
model=baseline \
model.glm_input_dim=256 \
model.compressed_dim=256 \
model.hidden_dim=128 \
model.lr=1e-5 \
> "${run_dir}/run.log" 2>&1 &
echo $! > "${run_dir}/pid.txt" |