-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrun_const_ncrfpp.sh
executable file
·66 lines (58 loc) · 2.36 KB
/
run_const_ncrfpp.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
58
59
60
61
62
63
64
TEST_NAME="test"
INPUT=./data/datasets/PTB-linearized/$TEST_NAME.tsv
TEST_PATH=./data/datasets/PTB/$TEST_NAME.trees
USE_GPU=True
EVALB=./tree2labels/EVALB/evalb
EVALB_PARAM=./tree2labels/EVALB/COLLINS.prm
OUTPUT=./data/outputs_const/
MODELS=./data/ncrfpp_models_const/
NCRFPP=./NCRFpp/
LOGS=./data/logs_const/
declare -a models=(
"glove.840B.300.finetune.linear"
"glove.840B.300.linear"
"glove.840B.300.finetune.lstms"
"glove.840B.300.lstms"
"random.300.linear"
"random.300.lstms"
"random.300.finetune.linear"
"random.300.finetune.lstms"
"random.1024.linear"
"random.1024.lstms"
"random.1024.finetune.linear"
"random.1024.finetune.lstms"
"wiki-news-300d-1M.finetune.linear"
"wiki-news-300d-1M.finetune.lstms"
"wiki-news-300d-1M.linear"
"wiki-news-300d-1M.lstms"
"GoogleNews-vectors-negative300.finetune.linear"
"GoogleNews-vectors-negative300.finetune.lstms"
"GoogleNews-vectors-negative300.linear"
"GoogleNews-vectors-negative300.lstms"
"dyer.sskip.100.linear"
"dyer.sskip.100.finetune.linear"
"dyer.sskip.100.finetune.lstms"
"dyer.sskip.100.lstms"
"elmo.finetune.linear"
"elmo.finetune.lstms"
"elmo.lstms"
"elmo.linear"
)
for i in "${models[@]}"
do
echo "Model:" $i
echo "Input:" $INPUT
echo "Gold test:" $TEST_PATH
MODEL_NAME=$i
taskset --cpu-list 1 \
python tree2labels/run_ncrfpp.py \
--test $INPUT \
--gold $TEST_PATH \
--model $MODELS/$MODEL_NAME \
--status test \
--gpu $USE_GPU \
--output $OUTPUT/$MODEL_NAME.$TEST_NAME.outputs.txt \
--evalb $EVALB \
--evalb_param $EVALB_PARAM \
--ncrfpp $NCRFPP > $LOGS/$MODEL_NAME.$TEST_NAME.$USE_GPU.log 2>&1
done