-
Notifications
You must be signed in to change notification settings - Fork 1
/
predictions.job
31 lines (26 loc) · 1.38 KB
/
predictions.job
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
#!/bin/bash
#SBATCH --job-name=SHA-PRED
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --time=0:10:00
#SBATCH --mem=16000M
#SBATCH --partition=gpu_shared
#SBATCH --gres=gpu:1
# $1 -> path to model
# $2 -> name of task
model=$1
task=$2 #adv adv_adv adv_conjunction namepp nounpp nounpp_adv simple
output="output/$task/$task"
stimuli="stimuli/$task/$task"
echo $model
echo $task
python -u extract_predictions.py $model -i $stimuli -o $output --cuda --eos-separator "<eos>" --format pkl --lang en --uppercase-first-word > /dev/null
if [[ "$task" == *"nounpp"* ]]; then
python get_agreement_accuracy_for_contrast.py -ablation-results $output.abl -info $stimuli.info -condition number_1=singular number_2=singular
python get_agreement_accuracy_for_contrast.py -ablation-results $output.abl -info $stimuli.info -condition number_1=singular number_2=plural
python get_agreement_accuracy_for_contrast.py -ablation-results $output.abl -info $stimuli.info -condition number_1=plural number_2=singular
python get_agreement_accuracy_for_contrast.py -ablation-results $output.abl -info $stimuli.info -condition number_1=plural number_2=plural
else
python get_agreement_accuracy_for_contrast.py -ablation-results $output.abl -info $stimuli.info -condition number_1=singular
python get_agreement_accuracy_for_contrast.py -ablation-results $output.abl -info $stimuli.info -condition number_1=plural
fi