-
Notifications
You must be signed in to change notification settings - Fork 1
/
script.txt
39 lines (30 loc) · 1.65 KB
/
script.txt
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
python3 preprocess.py --glove ./data/glove.840B.300d.txt --batch_size 48 --dir ./data/nli_bias_aaai2020/ --output snli
python3 get_pretrain_vecs.py --glove ./data/glove.840B.300d.txt --dict ./data/nli_bias_aaai2020/snli.word.dict \
--output ./data/snli.glove
DATA_NAME=occupation_gender_templates.stitch
python3 preprocess_unlabeled.py --glove ./data/glove.840B.300d.txt --batch_size 48 --dir ./data/nli_bias_aaai2020/ \
--sent1 ${DATA_NAME}.sent1.txt --sent2 ${DATA_NAME}.sent2.txt \
--vocab ./data/nli_bias_aaai2020/snli.word.dict --vocab_all ./data/nli_bias_aaai2020/snli.allword.dict \
--output ${DATA_NAME}
python3 get_pretrain_vecs.py --glove ./data/glove.840B.300d.txt --dict ./data/nli_bias_aaai2020/${DATA_NAME}.word.dict \
--output ./data/${DATA_NAME}.glove
MODEL=./models/baseline
python3 -u train.py --gpuid 0 --dir data/nli_bias_aaai2020/ \
--train_data snli-train.hdf5 --val_data snli-val.hdf5 \
--word_vecs snli.glove.hdf5 --dict snli.word.dict \
--encoder rnn --use_elmo_post 0 \
--save_file $MODEL | tee $MODEL.log.txt
MODEL=./models/baseline
python3 -u eval.py --gpuid 0 --dir data/nli_bias_aaai2020/ \
--data snli-test.hdf5 \
--word_vecs snli.glove.hdf5 --dict snli.word.dict \
--encoder rnn --use_elmo_post 0 \
--load_file $MODEL
DATA_NAME=occupation_gender_templates.stitch
MODEL=./models/baseline
python3 -u predict_unlabeled.py --gpuid 0 --dir data/nli_bias_aaai2020/ \
--data ${DATA_NAME}.hdf5 --res ${DATA_NAME}.sent1.txt,${DATA_NAME}.sent2.txt,${DATA_NAME}.x_pair.txt \
--word_vecs ${DATA_NAME}.glove.hdf5 --dict ${DATA_NAME}.word.dict \
--encoder rnn --use_elmo_post 0 \
--pred_output models/${DATA_NAME}.pred.txt \
--load_file $MODEL