MMSRL

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

generic_features_attention2.sh (1821B)


      1 #!/bin/bash
      2 #SBATCH -A lco@gpu
      3 #SBATCH --job-name=mmsrl             # job name
      4 #SBATCH --ntasks=1                   # number of MP tasks
      5 #SBATCH --ntasks-per-node=1          # number of MPI tasks per node
      6 #SBATCH --gres=gpu:1                 # number of GPUs per node
      7 #SBATCH --cpus-per-task=10           # number of cores per tasks
      8 #SBATCH --hint=nomultithread         # we get physical cores not logical
      9 #SBATCH --distribution=block:block   # we pin the tasks on contiguous cores
     10 #SBATCH --time=10:00:00               # maximum execution time (HH:MM:SS)
     11 #SBATCH --output=/gpfswork/rech/lco/url46ht/outputs/generic_features_attention/generic_features_attention_%j_%x_%A_%a.out  # output file name
     12 #SBATCH --error=/gpfswork/rech/lco/url46ht/outputs/generic_features_attention/generic_features_attention_%j_%x_%A_%a.err   # error file name
     13 #SBATCH --array=0-39
     14 
     15 
     16 cd $WORK/mmsrl
     17 
     18 module purge
     19 source ~/.bashrc
     20 conda activate pytorch
     21 export DATA_PATH=$WORK/data
     22 export TRANSFORMERS_CACHE=$HOME/.cache/huggingface/transformers
     23 export TRANSFORMERS_OFFLINE=1
     24 
     25 base_config=("--use_caption=True --use_clip=True"
     26              "--use_sbert=True --use_entities=True --use_clip=True"
     27              "--use_visualbert=True --use_clip=True")
     28 
     29 base_name=("caption"
     30            "entities"
     31            "visualbert")
     32 
     33 DIRNAME=generic_features_attention
     34 mkdir $WORK/outputs/$DIRNAME
     35 
     36 iconfig=$(($SLURM_ARRAY_TASK_ID%8))
     37 config=${base_config[$iconfig]}
     38 name=${base_name[$iconfig]}}
     39 
     40 python -m mmsrl.train configs/generic.py --pooling=attention $config \
     41     --patience=26 --batch_per_epoch=1000 \
     42     --cyclic_subsample=None --subsample_labels='interpolate_micro_to_macro' \
     43     --output_val=\"$WORK/outputs/$DIRNAME/val_${name}_${SLURM_ARRAY_TASK_ID}.pkl\" \
     44     --output_test=\"$WORK/outputs/$DIRNAME/test_${name}_${SLURM_ARRAY_TASK_ID}.pkl\"