-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcodellama_7b_generate_FLN-all_70.sh
73 lines (66 loc) · 3.22 KB
/
codellama_7b_generate_FLN-all_70.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
#!/bin/sh
eval "$(conda shell.bash hook)"
PROJECT_ROOT=$(cd $(dirname $0); cd ../; pwd -P)
echo "Project root path: $PROJECT_ROOT"
conda activate replay-env
# shellcheck disable=SC2112
# --prompt_style infill \
#function codellama_generate() {
# history_category_flag=6
# style=instruct
## for device_id in 0 1 2 3 4 5 6; do
# for device_id in 1 4 5 6; do
# CUDA_VISIBLE_DEVICES=$device_id nohup \
# python -u codellama_generate.py \
# --prompt_style $style \
# --subject_model_id codellama/CodeLlama-7b-Instruct-hf \
# --history_category $history_category_flag \
# --bugs_meta_data_file $PROJECT_ROOT/dataset/bugs_meta_data.json \
# --bugs_description_file $PROJECT_ROOT/dataset/github_issue/bugs_description.json \
# --history_data_path $PROJECT_ROOT/dataset/history_blame \
# --result_output_path $PROJECT_ROOT/model_inference_$((device_id+7)) \
# --has_nucleus_sampling 1 \
# --is_buggy_line_labeled 0 > log/FLN_all70/codellama_7b_${style}_${history_category_flag}_$((device_id+7)).log &
# echo "--------------------history_category_flag: $history_category_flag---------------------"
# done
#}
#function codellama_generate() {
# history_category_flag=6
# style=instruct
# for device_id in 0 1 2 3 4 5 6; do
# CUDA_VISIBLE_DEVICES=$device_id nohup \
# python -u codellama_generate.py \
# --prompt_style $style \
# --subject_model_id codellama/CodeLlama-7b-Instruct-hf \
# --history_category $history_category_flag \
# --bugs_meta_data_file $PROJECT_ROOT/dataset/bugs_meta_data.json \
# --bugs_description_file $PROJECT_ROOT/dataset/github_issue/bugs_description.json \
# --history_data_path $PROJECT_ROOT/dataset/history_blame \
# --result_output_path $PROJECT_ROOT/model_inference_label_${history_category_flag}_${device_id} \
# --has_nucleus_sampling 1 \
# --is_buggy_line_labeled 1 > log/FLN_all70/${style}/codellama_7b_${style}_${history_category_flag}_${device_id}.log &
# echo "--------------------history_category_flag: $history_category_flag---------------------"
# done
#}
function codellama_generate() {
history_category_flag=6
style=infill
for device_id in 0 1 2 3 4 5 6; do
CUDA_VISIBLE_DEVICES=$device_id nohup \
python -u codellama_generate.py \
--prompt_style $style \
--subject_model_id codellama/CodeLlama-7b-Instruct-hf \
--history_category $history_category_flag \
--bugs_meta_data_file $PROJECT_ROOT/dataset/bugs_meta_data.json \
--bugs_description_file $PROJECT_ROOT/dataset/github_issue/bugs_description.json \
--history_data_path $PROJECT_ROOT/dataset/history_blame \
--result_output_path $PROJECT_ROOT/model_inference_infill_${history_category_flag}_${device_id} \
--has_nucleus_sampling 1 \
--is_buggy_line_labeled 0 > log/FLN_all70/${style}/codellama_7b_${style}_${history_category_flag}_${device_id}.log &
echo "--------------------history_category_flag: $history_category_flag---------------------"
done
}
mkdir -p log/FLN_all70/instruct
mkdir -p log/FLN_all70/infill
codellama_generate
conda deactivate