contrastive_alignment.sh (1561B)
1 #!/bin/bash 2 #SBATCH -A lco@gpu 3 #SBATCH -C v100-32g 4 #SBATCH --job-name=gbure_contrastive 5 #SBATCH --ntasks=1 6 #SBATCH --gres=gpu:1 7 #SBATCH --cpus-per-task=10 8 #SBATCH --distribution=block:block 9 #SBATCH --hint=nomultithread 10 #SBATCH --time=20:00:00 11 #SBATCH --output=/gpfswork/rech/lco/url46ht/Étienne/runs/%x_%j.stdout 12 #SBATCH --error=/gpfswork/rech/lco/url46ht/Étienne/runs/%x_%j.stderr 13 #SBATCH --array=0-23 14 15 # %x = nom du job 16 # %j = id du job 17 18 module purge 19 source ~/.bashrc 20 conda activate Étienne 21 export DATA_PATH=$WORK/Étienne/data 22 export LOG_PATH=$WORK/Étienne/log 23 export HF_DATASETS_OFFLINE=1 24 export TRANSFORMERS_OFFLINE=1 25 cd $WORK/Étienne/code 26 27 # echo des commandes lancées 28 set -x 29 30 config="" 31 32 if [ $(( $SLURM_ARRAY_TASK_ID % 3 )) -eq 0 ]; then 33 config="$config --language_model_weight=0" 34 elif [ $(( $SLURM_ARRAY_TASK_ID % 3 )) -eq 1 ]; then 35 config="$config --language_model_weight=0.1" 36 else 37 config="$config --language_model_weight=1" 38 fi 39 40 if [ $(( $SLURM_ARRAY_TASK_ID / 3 % 4 )) -eq 0 ]; then 41 config="$config --margin=0.1" 42 elif [ $(( $SLURM_ARRAY_TASK_ID / 3 % 4 )) -eq 1 ]; then 43 config="$config --margin=1" 44 elif [ $(( $SLURM_ARRAY_TASK_ID / 3 % 4 )) -eq 2 ]; then 45 config="$config --margin=10" 46 else 47 config="$config --margin=100" 48 fi 49 50 if [ $(( $SLURM_ARRAY_TASK_ID / 12 % 2 )) -eq 0 ]; then 51 config="$config --topological_weight=1" 52 else 53 config="$config --topological_weight=0.2" 54 fi 55 56 config="$config --seed=$(($SLURM_ARRAY_TASK_ID / 24))" 57 58 python -m gbure.train gbure/config/contrastive_alignment.py $config --post_transformer_layer=\"layer_norm\"