-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun_batch.sh
More file actions
66 lines (66 loc) · 1.84 KB
/
run_batch.sh
File metadata and controls
66 lines (66 loc) · 1.84 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
#!/bin/bash
echo -n "Experiment: ";
read -r exp;
echo -n "cuda: ";
read -r i;
if [[ $exp == *"simulation"* ]];
then
if [[ $exp == *"noise"* ]] || [[ $exp == *"grid"* ]] || [[ $exp == *"compare"* ]] || [[ $exp == *"flow"* ]] || [[ $exp == *"linear"* ]] || [[ $exp == *"brownian"* ]] || [[ $exp == *"irreg"* ]];
then
for file in $exp/*.yaml; do
screen_name=${file////-}
echo "$screen_name";
screen -S $screen_name -dm bash -c "python3 train.py -f $file -d cuda:$i -e $exp; sleep 300";
i=$((i+1))
if [[ $i == 4 ]]
then
i=0
fi
done
else
echo -n "npoints: ";
read -r npoints;
for dir in $exp/*/; do
i=0
[ -L "${dir%/}" ]
if [[ $dir == *"$npoints"* ]]
then
for file in $dir/*.yaml; do
screen_name=${file////-}
echo "$screen_name";
screen -S $screen_name -dm bash -c "python3 train.py -f $file -d cuda:$i -e $dir; sleep 300";
i=$((i+1))
if [[ $i == 4 ]]
then
i=0
fi
done
fi
done
fi
else
if [[ $exp == *"FK"* ]];
then
for file in $exp/*.yaml; do
screen_name=${file////-}
echo "$screen_name";
screen -S $screen_name -dm bash -c "python3 mean_train_fk.py -f $file -d cuda:$i -e $exp; sleep 300";
i=$((i+1))
if [[ $i == 4 ]]
then
i=0
fi
done
else
for file in $exp/*.yaml; do
screen_name=${file////-}
echo "$screen_name";
screen -S $screen_name -dm bash -c "python3 train.py -f $file -d cuda:$i -e $exp; sleep 300";
i=$((i+1))
if [[ $i == 4 ]]
then
i=0
fi
done
fi
fi