-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_inference.sh
64 lines (54 loc) · 1.92 KB
/
run_inference.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
#!/bin/bash
root_path="."
arr=("Scientific_reports" "Novels" "Social_media" "Newspapers")
att=("birth_date" "birth_place" "university" "major" "company" "workplace")
arr_len=${#arr[@]}
att_len=${#att[@]}
for ((i=0; i<$arr_len; i++))
do
for ((j=i+1; j<$arr_len; j++))
do
for ((k=0; k<$att_len; k++))
do
model_path=$root_path/${arr[$i]}_vs_${arr[$j]}/checkpoint-780/
echo $model_path
python3 ./src/inference.py --model_path $model_path --test_file $root_path/data_scripts/type_fights/bio_data_train_${arr[$i]}_vs_${arr[$j]}.json --field ${att[$k]}
done
done
done
# # inference different scales
# #!/bin/bash
# export CUDA_VISIBLE_DEVICES=0
# root_path="."
# arr=("1.4b" "1b" "2.8b" "6.9b" "14m" "70m" "160m" "410m")
# att=("birth_date" "birth_place" "university" "major" "company" "workplace")
# arr_len=${#arr[@]}
# att_len=${#att[@]}
# test_file=$root_path/data_scripts/type_fights/bio_data_train_Social_media_vs_Newspapers.json
# for ((i=0; i<$arr_len; i++))
# do
# for ((k=0; k<$att_len; k++))
# do
# model_path=$root_path/pythia_${arr[$i]}_Social_media_vs_Newspapers/checkpoint-390
# echo $model_path
# python3 ./src/inference.py --model_path $model_path --test_file $test_file --field ${att[$k]}
# done
# done
# # inference sat/paper
# root_path="."
# arr=("Social_media" "Newspapers")
# att=("sat_score" "paper_num")
# arr_len=${#arr[@]}
# att_len=${#att[@]}
# for ((i=0; i<$arr_len; i++))
# do
# for ((j=i+1; j<$arr_len; j++))
# do
# for ((k=0; k<$att_len; k++))
# do
# model_path=$root_path/${arr[$i]}_vs_${arr[$j]}_with_sat_paper/checkpoint-785/
# echo $model_path
# python3 ./src/inference.py --model_path $model_path --test_file $root_path/data_scripts/bio_data_train_${arr[$i]}_vs_${arr[$j]}_with_sat_paper.json --field ${att[$k]} --use_statement
# done
# done
# done