| #!/bin/bash |
|
|
| |
| 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" |