-
Notifications
You must be signed in to change notification settings - Fork 2
/
run_pipeline.sh
executable file
·79 lines (73 loc) · 1.6 KB
/
run_pipeline.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
#!/bin/bash
show_pipeline_selection_menu() {
echo "Choose the pipeline to execute:"
echo "1. Approach 1 : Pre-finetuning -> Finetuning"
echo "2. Approach 2 : Finetuning"
echo "3. Exit"
echo
}
show_quantize_menu() {
echo "Choose whether to quantize models or not:"
echo "1. Yes"
echo "2. No"
echo
}
option1() {
show_quantize_menu
read -p "Enter your choice: " quantize_choice
python run_task.py --task ss
python run_task.py --task ss-ke
case $quantize_choice in
1)
python quantize.py --model "camembert-ss-ke"
echo "Finished..."
break
;;
2)
echo "Finished..."
break
;;
*)
echo "Invalid option. Please try again."
;;
esac
}
option2() {
show_quantize_menu
read -p "Enter your choice: " quantize_choice
python run_task.py --task ke
case $quantize_choice in
1)
python quantize.py --model "camembert-ke"
echo "Finished..."
break
;;
2)
echo "Finished..."
break
;;
*)
echo "Invalid option. Please try again."
;;
esac
}
while true; do
show_pipeline_selection_menu
read -p "Enter your choice: " choice
case $choice in
1)
option1
;;
2)
option2
;;
3)
echo "Exiting..."
break
;;
*)
echo "Invalid option. Please try again."
;;
esac
echo
done