-
Notifications
You must be signed in to change notification settings - Fork 6
/
attributions.sh
57 lines (50 loc) · 1.47 KB
/
attributions.sh
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
#SBATCH -p veu # Partition to submit to
#SBATCH --job-name=sva_bert
#SBATCH --mem=40G # Max CPU Memory
#SBATCH -x veuc01,veuc05,veuc06
#SBATCH --gres=gpu:1
#SBATCH --output=/home/usuaris/veu/javier.ferrando/logs_jupyter/%j.out
CUDA_VISIBLE_DEVICES=0
set -ex
export LC_ALL=en_US.UTF-8
export PATH=~/anaconda3/bin:$PATH
export PYTHONUNBUFFERED=TRUE
source activate attn_flow
dataset=sst2
num_samples=1000
bert_seed=0
END=10
for bert_seed in $(seq 0 $END); do
echo $bert_seed
model_name=multiberts-seed_$bert_seed
python attributions.py --model $model_name \
--dataset $dataset \
--samples $num_samples
done
# for faith_metric in comp suff; do
# if [ $dataset = imdb ] || [ $dataset = yelp ]
# then
# max_skip=60
# else
# max_skip=30
# fi
# for i in {1..2}; do
# if [[ "$i" == '1' ]]
# then
# echo $max_skip
# python aupc.py --model $model_name \
# --dataset $dataset \
# --samples $num_samples \
# --fidelity-type $faith_metric \
# --bins \
# --max-skip $max_skip
# else
# python aupc.py --model $model_name \
# --dataset $dataset \
# --samples $num_samples \
# --fidelity-type $faith_metric \
# --max-skip $max_skip
# fi
# done
# done