-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheval.sh
More file actions
executable file
·35 lines (30 loc) · 846 Bytes
/
eval.sh
File metadata and controls
executable file
·35 lines (30 loc) · 846 Bytes
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
#! /bin/bash
results_dir=$1
id_range=${2:-"0-400"}
concurrency=${3:-10}
resume=${4:-False}
repo_cache=${5:-".cache/repo-mini"}
task_start=$(echo $id_range | cut -d "-" -f 1)
task_end=$(echo $id_range | cut -d "-" -f 2)
echo "results_dir: $results_dir"
echo "id_range: $task_start-$task_end"
echo "concurrency: $concurrency"
echo "resume: $resume"
echo "repo_cache: $repo_cache"
function run() {
python -m dibench.eval \
--result_dir $results_dir \
--repo_cache $repo_cache \
--id_range ${start},${end} \
--exec_eval False \
--resume $resume
}
task_num=$(((${task_end}-${task_start})/${concurrency}))
for i in $(seq 0 $((${concurrency}-1)))
do
start=$((${i}*${task_num}+${task_start}))
end=$((${start}+${task_num}))
echo "evaluating ${start}-${end}"
run ${start} ${end} &
done
wait