-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathablation_torch.sh
More file actions
executable file
·107 lines (82 loc) · 3.29 KB
/
Copy pathablation_torch.sh
File metadata and controls
executable file
·107 lines (82 loc) · 3.29 KB
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
# Torch
regen=1 # Regenerate invariants flag for all runs
num_p=141 # Maximum number of parallel jobs for Slurm
cp torch_variations.txt torch_variations.txt.bak
# No rule refinement ###################################
source venv/bin/activate
cp torch_ablation_apis.txt torch_apis.txt
python -m utils.sync_apis_and_variations torch
rm -r corpus_torch/*
echo "--------------------------------"
echo "Running pipeline without rule refinement..."
echo "--------------------------------"
bash pipeline.sh torch 1 0 torch_ablation_no_rule_refinement $regen $num_p
#########################################################
# No DocErr #############################################
source venv/bin/activate
cp torch_variations.txt.bak torch_variations.txt
cp torch_ablation_apis.txt torch_apis.txt
python -m utils.sync_apis_and_variations torch
rm -r corpus_torch/*
rm -r rules-torch
mv ablation/rules-torch-no-doc-err-msg rules-torch
if [ $? -ne 0 ]; then
echo "Error: Failed to move rules-torch-no-doc-err-msg to rules-torch."
exit 1
fi
echo "--------------------------------"
echo "Running pipeline without DocErr..."
echo "--------------------------------"
bash pipeline.sh torch 1 1 torch_ablation_no_doc_err $regen $num_p
#########################################################
# No Feedback ###########################################
source venv/bin/activate
# cp torch_variations.txt.bak torch_variations.txt
cp torch_ablation_apis.txt torch_apis.txt
python -m utils.sync_apis_and_variations torch
rm -r corpus_torch/*
rm -r rules-torch
mv ablation/rules-torch-no-feedback rules-torch
if [ $? -ne 0 ]; then
echo "Error: Failed to move rules-torch-no-feedback to rules-torch."
exit 1
fi
echo "--------------------------------"
echo "Running pipeline without Feedback..."
echo "--------------------------------"
bash pipeline.sh torch 1 1 torch_ablation_no_feedback $regen $num_p
#########################################################
# No Example Rules ######################################
source venv/bin/activate
cp torch_variations.txt.bak torch_variations.txt
cp torch_ablation_apis.txt torch_apis.txt
python -m utils.sync_apis_and_variations torch
rm -r corpus_torch/*
rm -r rules-torch
mv ablation/rules-torch-no-exrules rules-torch
if [ $? -ne 0 ]; then
echo "Error: Failed to move rules-torch-no-exrules to rules-torch."
exit 1
fi
echo "--------------------------------"
echo "Running pipeline without Example Rules..."
echo "--------------------------------"
bash pipeline.sh torch 1 1 torch_ablation_no_example_rules $regen $num_p
#########################################################
# Remove everything #######################################
source venv/bin/activate
cp torch_variations.txt.bak torch_variations.txt
cp torch_ablation_apis.txt torch_apis.txt
python -m utils.sync_apis_and_variations torch
rm -r corpus_torch/*
rm -r rules-torch
mv ablation/rules-torch-no-doc-err-msg-feedback-exrules rules-torch
if [ $? -ne 0 ]; then
echo "Error: Failed to move rules-torch-no-doc-err-msg-feedback-exrules to rules-torch."
exit 1
fi
echo "--------------------------------"
echo "Running pipeline without all features..."
echo "--------------------------------"
bash pipeline.sh torch 1 0 torch_ablation_no_all_features $regen $num_p
#########################################################