-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_evaluate.sh
35 lines (34 loc) · 1.22 KB
/
run_evaluate.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
# arr: task order
# data_dir: test dataset path
arr=('Classification' 'Text_Quality_Evaluation' 'Code' 'Detection' 'Sentiment_Analysis' 'Comprehension' 'Closed_QA' 'Extraction' 'Dialogue' 'Program_Execution' 'Rewriting' 'Open_QA' 'Misc' 'Generation' 'Summarization' 'Mathematics')
data_dir='dataset/test'
model_dir='curriculum_model'
output_merge_dir="curriculum_model_output"
for i in {0..15}
do
echo "start evaluate ${arr[i]}_model"
if [ $i != 0 ]; then
max=$(($i-1))
for d in $(seq 0 ${max})
do
echo "start evaluate ${arr[i]}_model with ${arr[d]}"
torchrun --nproc_per_node 8 --nnodes 1 evaluation_CL.py \
--model_name_or_path ${model_dir}/${arr[i]} \
--input_file ${data_dir}/${arr[d]}.jsonl \
--output_merge_dir ${output_merge_dir} \
--output_dir ${arr[i]}_model \
--output_file ${arr[d]} \
--batch_size 8 \
--model_max_length 2048
done
fi
echo "start evaluate ${arr[i]}_model with ${arr[i]}"
torchrun --nproc_per_node 8 --nnodes 1 evaluation_CL.py \
--model_name_or_path ${model_dir}/${arr[i]} \
--input_file ${data_dir}/${arr[i]}.jsonl \
--output_merge_dir ${output_merge_dir} \
--output_dir ${arr[i]}_model \
--output_file ${arr[i]} \
--batch_size 8 \
--model_max_length 2048
done