MMSRL

Our Multimodal Semantic Role Labeling model for CONSTRAINT 2022
git clone https://esimon.eu/repos/MMSRL.git
Log | Files | Refs | Submodules | README

ofa_seq2seq_freeze.sh (2451B)


      1 #!/bin/bash
      2 #SBATCH -A lco@gpu
      3 #SBATCH -C v100-32g
      4 #SBATCH --job-name=mmsrl             # job name
      5 #SBATCH --ntasks=1                   # number of MP tasks
      6 #SBATCH --ntasks-per-node=1          # number of MPI tasks per node
      7 #SBATCH --gres=gpu:1                 # number of GPUs per node
      8 #SBATCH --cpus-per-task=10           # number of cores per tasks
      9 #SBATCH --hint=nomultithread         # we get physical cores not logical
     10 #SBATCH --distribution=block:block   # we pin the tasks on contiguous cores
     11 #SBATCH --time=10:00:00               # maximum execution time (HH:MM:SS)
     12 #SBATCH --output=/gpfswork/rech/lco/url46ht/outputs/fixed_seq2seq_%j_%x_%A_%a.out  # output file name
     13 #SBATCH --error=/gpfswork/rech/lco/url46ht/outputs/fixed_seq2seq_%j_%x_%A_%a.err   # error file name
     14 #SBATCH --array=0-321
     15 
     16 set -x
     17 
     18 cd $WORK/mmsrl
     19 
     20 module purge
     21 source ~/.bashrc
     22 conda activate pytorch
     23 export DATA_PATH=$WORK/data
     24 
     25 base_config=(""
     26              "--ofa_path=OFA/checkpoints/ofa_base.pt"
     27              "--weight_decay=0.01"
     28              "--ofa_path=OFA/checkpoints/ofa_base.pt --weight_decay=0.01")
     29 base_config_name=("vqa_large"
     30                   "base"
     31                   "vqa_large_ddecay"
     32                   "base_ddecay")
     33 base_freeze=("--unfreeze='all'"
     34              "--unfreeze='all' --freeze_resnet"
     35              "--unfreeze='all' --freeze_embeddings --freeze_resnet"
     36              "--unfreeze=classifier --freeze_resnet")
     37 base_freeze_name=("none"
     38                   "resnet"
     39                   "resnet_emb"
     40                   "all")
     41 base_loss=("--subsample_labels=macro"
     42 	       "--subsample_labels=macro --label_smoothing=0.1"
     43 	       "--subsample_labels=interpolate_micro_to_macro"
     44            "--subsample_labels=interpolate_micro_to_macro --label_smoothing=0.1")
     45 base_loss_name=("macro_onehot"
     46                 "macro_smoothed"
     47                 "interpolate_onehot"
     48                 "interpolate_smooth")
     49 
     50 iconfig=$(($SLURM_ARRAY_TASK_ID%4))
     51 ifreeze=$(($SLURM_ARRAY_TASK_ID/4%4))
     52 iloss=$(($SLURM_ARRAY_TASK_ID/16%4))
     53 config=${base_config[$iconfig]}
     54 freeze=${base_freeze[$ifreeze]}
     55 loss=${base_loss[$iloss]}
     56 name=${base_config_name[$iconfig]}_${base_freeze_name[$ifreeze]}_${base_loss_name[$iloss]}
     57 
     58 python -m mmsrl.train configs/ofa_ours.py configs/ofa_vqa.py configs/ofa_seq2seq.py --patience=26 $config $freeze $loss --output_val=\"$WORK/outputs/val_${name}_${SLURM_ARRAY_TASK_ID}.pkl\" --output_test=\"$WORK/outputs/test_${name}_${SLURM_ARRAY_TASK_ID}.pkl\"