-
Notifications
You must be signed in to change notification settings - Fork 2
/
run-eval-mixed.sh
executable file
·72 lines (47 loc) · 1.3 KB
/
run-eval-mixed.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
#!/bin/bash
# Perform a multi-run evaluation by samplingg accross ALL positive or negative, respectively repos
source config
maxRunCount=50
#outBase="reports/sampled/onlyout"
#$inBase="data-latc"
#while read line; do
# line=`echo $line | grep -v "^\s*#"`
# if [ -z "$line" ]; then
# continue
# fi
max=300
n=50
type="$1"
if [ -z "$type" ]; then
echo "Please specify positive or negative"
exit
fi
baseSeed=$2
args=""
endpoints=""
for dir in `find "$mixedRepo" -maxdepth 1 -mindepth 1 -type d`; do
candidateFile="$dir/$type.nt"
if [ -f $candidateFile ]; then
export args="$args $n $candidateFile"
endpointsFile="$dir/endpoints.txt"
export endpoints="$endpoints $endpointsFile"
fi
done
#echo "$args"
#exit 0
for (( i=1; i<=$maxRunCount; ++i )); do
outDir="$mixedRepo/$type/$i"
seed=$(($baseSeed + $i))
cmd="java -Xmx4096M -server -d64 -jar target/qa_for_lod-0.0.1-SNAPSHOT-jar-with-dependencies.jar -onlyout -nogui -triples $args -out $outDir -endpoints $endpoints -seed $seed -permissive -max $max"
echo "$cmd"
echo ""
echo ""
echo "Processing:"
echo "---------------------------------------------"
echo "Type : $type"
echo "Source Directory: $dir"
echo "Output Directory: $outDir"
echo "Seed : $i"
echo "Endpoint : $endpointsFile"
$cmd
done