-
Notifications
You must be signed in to change notification settings - Fork 1
/
eval_baseline.sh
153 lines (141 loc) · 7.59 KB
/
eval_baseline.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
#!/bin/bash
#SBATCH --job-name=eval_baseline
#SBATCH -c 3
#SBATCH --partition=a100
#SBATCH --gres=gpu:1
#SBATCH --time=24:00:00
#SBATCH --mem=50G
#SBATCH --output=../../jobs/%x/%j.out
metrics=("bleu" "rouge" "bertscore" "bleurt" "comet_da" "bart_score_cnn" "bart_score_para" "bart_score_cnn_src_hypo" "bart_score_para_src_hypo" "unieval_sum" "cometkiwi_da")
# # summarization
# input_file="../../BARTScore/SUM/SummEval/final_p_with_xgptscore.json"
# output_file="../../BARTScore/SUM/SummEval/final_p_with_xgptscore.eval.json"
# human_score_names="coherence,consistency,fluency,relevance"
# cp -u $input_file $output_file
# for metric in "${metrics[@]}"; do
# echo "Evaluating $metric"
# python eval_baseline.py --input_file $output_file --output_file $output_file --metrics "$metric" \
# --human_score_names "$human_score_names"
# done
# python eval_baseline.py --input_file $output_file --output_file $output_file --metrics "$metrics" \
# --human_score_names "$human_score_names" --print_results True
# # data2text
# input_file="../../data_bak/webnlg/webnlg2020_gen_with_scores.json"
# output_file="../../data_bak/webnlg/webnlg2020_gen_with_scores.eval.json"
# input_file="../../data/evaluation/d2t/webnlg_2020/test_data_prepared.json"
# output_file="../../data/evaluation/d2t/webnlg_2020/test_data_prepared.eval.json"
# human_score_names="Correctness,DataCoverage,Fluency,Relevance,TextStructure"
# cp -u $input_file $output_file
# metrics=("${metrics[@]}" "instructscore_d2t" "gptscore_flan_d2t" "gptscore_flan_d2t_src_hypo")
# for metric in "${metrics[@]}"; do
# echo "Evaluating $metric"
# python eval_baseline.py --input_file $output_file --output_file $output_file --metrics "$metric" \
# --human_score_names "$human_score_names"
# done
# python eval_baseline.py --input_file $output_file --output_file $output_file --metrics "$metrics" \
# --human_score_names "$human_score_names" --print_results True
# # # long_form_QA
# input_file="../../data_bak/lfqa/test.gpt-4.rank.json"
# output_file="../../data_bak/lfqa/test.gpt-4.rank.eval.json"
# human_score_names="rank"
# cp -u $input_file $output_file
# for metric in "${metrics[@]}"; do
# echo "Evaluating $metric"
# python eval_baseline.py --input_file $output_file --output_file $output_file --metrics "$metric" \
# --human_score_names "$human_score_names"
# done
# python eval_baseline.py --input_file $output_file --output_file $output_file --metrics "$metrics" \
# --human_score_names "$human_score_names" --print_results True
# # instruction-following
# input_file="../../data_bak/llm-blender/mix-instruct/test_data_prepared_300.json"
# output_file="../../data_bak/llm-blender/mix-instruct/test_data_prepared_300.eval.json"
# input_file="../../data/evaluation/instruct/mixinstruct/test_data_prepared.json"
# output_file="../../data/evaluation/instruct/mixinstruct/test_data_prepared.eval.json"
# human_score_names="gpt_rank_score"
# # cp -u $input_file $output_file
# metrics=("tigerscore")
# # for metric in "${metrics[@]}"; do
# # echo "Evaluating $metric"
# # python eval_baseline.py --input_file $output_file --output_file $output_file --metrics "$metric" \
# # --human_score_names "$human_score_names"
# # done
# python eval_baseline.py --input_file $output_file --output_file $output_file --metrics "$metrics" \
# --human_score_names "$human_score_names" --print_results True --average_by "sys" --as_rank "True"
# mathqa
# input_file="../../data_bak/mathqa/gsm8k_test_output_prepared.json"
# output_file="../../data_bak/mathqa/gsm8k_test_output_prepared.eval.json"
# input_file="../../data/evaluation/mathqa/gsm8k/test_data_prepared.json"
# output_file="../../data/evaluation/mathqa/gsm8k/test_data_prepared.eval.json"
# human_score_names="accuracy"
# metrics=("instructscore")
# cp -u $input_file $output_file
# for metric in "${metrics[@]}"; do
# echo "Evaluating $metric"
# python eval_baseline.py --input_file $output_file --output_file $output_file --metrics "$metric" \
# --human_score_names "$human_score_names"
# done
# python eval_baseline.py --input_file $output_file --output_file $output_file --metrics "$metrics" \
# --human_score_names "$human_score_names" --print_results True
# # # story_gen
# input_file="../../data/evaluation/storygen/test_data_prepared.json"
# output_file="../../data/evaluation/storygen/test_data_prepared_eval.json"
# metrics=("instructscore")
# human_score_names="human"
# cp -u $input_file $output_file
# # for metric in "${metrics[@]}"; do
# # echo "Evaluating $metric"
# # python eval_baseline.py --input_file $output_file --output_file $output_file --metrics "$metric" \
# # --human_score_names "$human_score_names"
# # done
# python eval_baseline.py --input_file $output_file --output_file $output_file --metrics "$metrics" \
# --human_score_names "$human_score_names" --print_results True
# translation
# input_file="../../data/evaluation/translation/wmt22/zh-en/eval_data.json"
# output_file="../../data/evaluation/translation/wmt22/zh-en/eval_data.eval.json"
# human_score_names="mqm"
# metrics=("instructscore_mt_zh-en")
# cp -u $input_file $output_file
# # for metric in "${metrics[@]}"; do
# # echo "Evaluating $metric"
# # python eval_baseline.py --input_file $output_file --output_file $output_file --metrics "$metric" \
# # --human_score_names "$human_score_names"
# # done
# python eval_baseline.py --input_file $output_file --output_file $output_file --metrics "$metrics" \
# --human_score_names "$human_score_names" --print_results True
# input_file="../../data/evaluation/hhh_alignment/hhh_alignment.json"
# output_file="../../data/evaluation/hhh_alignment/hhh_alignment.eval.json"
# human_score_names="human_preference"
# metrics=("bart_score_para_src_hypo")
# cp -u $input_file $output_file
# for metric in "${metrics[@]}"; do
# echo "Evaluating $metric"
# python eval_baseline.py --input_file $output_file --output_file $output_file --metrics "$metric" \
# --human_score_names "$human_score_names"
# done
# python eval_baseline.py --input_file $output_file --output_file $output_file --metrics "$metrics" \
# --human_score_names "$human_score_names" --add_aggrement True --print_results True
# input_file="../../data/evaluation/mtbench/mt_bench_human_judgments.json"
# output_file="../../data/evaluation/mtbench/mt_bench_human_judgments.eval.json"
# human_score_names="human_preference"
# metrics=("bart_score_para_src_hypo")
# cp -u $input_file $output_file
# for metric in "${metrics[@]}"; do
# echo "Evaluating $metric"
# python eval_baseline.py --input_file $output_file --output_file $output_file --metrics "$metric" \
# --human_score_names "$human_score_names"
# done
# python eval_baseline.py --input_file $output_file --output_file $output_file --metrics "$metrics" \
# --human_score_names "$human_score_names" --add_aggrement True --print_results True
# input_file="../../data/evaluation/pair_cmp/test_data_prepared.json"
# output_file="../../data/evaluation/pair_cmp/test_data_prepared.eval.json"
# human_score_names="gpt_rank_score"
# cp -u $input_file $output_file
# # metrics=("bleu" "rouge" "bertscore" "bleurt" "comet_da" "bart_score_cnn" "unieval_sum" "cometkiwi_da")
# metrics=("unieval_sum")
# for metric in "${metrics[@]}"; do
# echo "Evaluating $metric"
# python eval_baseline.py --input_file $output_file --output_file $output_file --metrics "$metric" \
# --human_score_names "$human_score_names"
# done
# python eval_baseline.py --input_file $output_file --output_file $output_file --metrics "$metrics" \
# --human_score_names "$human_score_names" --print_results True --average_by "sys" --as_rank "True"