-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathrun_hunks_ARC.sh
45 lines (45 loc) · 1.41 KB
/
run_hunks_ARC.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
read -p "please input your dataset name:" name
read -p "please input your cuda number:" cu
python model/main.py \
--gpu $cu \
--n-epochs 30 \
--dim 128 \
--bsize 32 \
--query_maxlen 256 \
--doc_maxlen 256 \s
--special-tokens "QARC" \
--data-dpath "./data/"$name \
--triples "training_dataset_RN_hunks.csv" \
--config "BERTOverflow" &&
python model/indexer.py \
--gpu $cu \
--bsize 32 \
--dim 128 \
--query_maxlen 256 \
--doc_maxlen 256 \
--checkpoint "./data/"$name"/model_SemanticCodebert_"$name"_RN_bertoverflow_QARC_q256_d256_dim128_cosine_hunks" \
--data-dpath "./data/"$name \
--chunksize 6.0 &&
python model/faiss_indexer.py \
--gpu $cu \
--data-dpath "./data/"$name \
--index-name "INDEX_SemanticCodebert_RN_bertoverflow_QARC_q256_d256_dim128_cosine_q256_d256_dim128_hunks_token" \
--partitions 256 &&
python model/ranking.py \
--gpu $cu \
--dim 128 \
--query-maxlen 256 \
--doc-maxlen 256 \
--bsize 32 \
--data-dpath "./data/"$name \
--checkpoint "./data/"$name"/model_SemanticCodebert_"$name"_RN_bertoverflow_QARC_q256_d256_dim128_cosine_hunks" \
--index_name "INDEX_SemanticCodebert_RN_bertoverflow_QARC_q256_d256_dim128_cosine_q256_d256_dim128_hunks_token" \
--faiss_name "ivfpq.256.faiss" \
--faiss_depth 1024 \
--nprobe 100 &&
cd "results" &&
python accuracy.py \
--n-epochs 30 \
--bsize 32 \
--k 32 \
--dataset $name