forked from joneswong/AutoGraph
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathregression.sh
More file actions
61 lines (51 loc) · 4.1 KB
/
regression.sh
File metadata and controls
61 lines (51 loc) · 4.1 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
# !/bin/bash
set -e
GPUIDX=$1
NUMEXP=$2
RESPATH=$3
if [ ! -d "data" ]; then
# Control will enter here if $DIRECTORY doesn't exist.
mkdir data
fi
echo "gpuidx is ${GPUIDX}"
wget 'http://joneswzshare.oss-cn-hangzhou-zmf.aliyuncs.com/download/public-data.zip'
yes A | unzip public-data.zip -d data/
rm public-data.zip
wget 'https://daoyuanshare.oss-cn-hangzhou.aliyuncs.com/download/external-data.zip'
yes A | unzip external-data.zip -d data/
rm external-data.zip
if docker images | grep nehzux/kddcup2020; then
echo "the docker image has been pulled"
else
echo "no docker image"
docker pull nehzux/kddcup2020:v2
fi
if [ -z $3 ]
then
echo "you do not specify the result saving path. Use default path: current dir"
RESPATH="."
else
if [ ! -d ${RESPATH} ]; then
# Control will enter here if $DIRECTORY doesn't exist.
mkdir ${RESPATH}
fi
fi
for i in $(seq 1 1 $NUMEXP)
do
echo "exp${i}"
echo "results save to ${RESPATH}/"
rm -rf ${RESPATH}/exp${i}.out
rm -rf ${RESPATH}/exp${i}.err
docker run --gpus device=${GPUIDX} --cpus=4 --memory=30g -it --rm -v "$(pwd):/app/autograph" -w /app/autograph nehzux/kddcup2020:v2 python run_local_test.py --dataset_dir=./data/public/a --code_dir=./code_submission --seed=${i} 2>>${RESPATH}/exp${i}.err | tee -a ${RESPATH}/exp${i}.out
docker run --gpus device=${GPUIDX} --cpus=4 --memory=30g -it --rm -v "$(pwd):/app/autograph" -w /app/autograph nehzux/kddcup2020:v2 python run_local_test.py --dataset_dir=./data/public/b --code_dir=./code_submission --seed=${i} 2>>${RESPATH}/exp${i}.err | tee -a ${RESPATH}/exp${i}.out
docker run --gpus device=${GPUIDX} --cpus=4 --memory=30g -it --rm -v "$(pwd):/app/autograph" -w /app/autograph nehzux/kddcup2020:v2 python run_local_test.py --dataset_dir=./data/public/c --code_dir=./code_submission --seed=${i} 2>>${RESPATH}/exp${i}.err | tee -a ${RESPATH}/exp${i}.out
docker run --gpus device=${GPUIDX} --cpus=4 --memory=30g -it --rm -v "$(pwd):/app/autograph" -w /app/autograph nehzux/kddcup2020:v2 python run_local_test.py --dataset_dir=./data/public/d --code_dir=./code_submission --seed=${i} 2>>${RESPATH}/exp${i}.err | tee -a ${RESPATH}/exp${i}.out
docker run --gpus device=${GPUIDX} --cpus=4 --memory=30g -it --rm -v "$(pwd):/app/autograph" -w /app/autograph nehzux/kddcup2020:v2 python run_local_test.py --dataset_dir=./data/public/e --code_dir=./code_submission --seed=${i} 2>>${RESPATH}/exp${i}.err | tee -a ${RESPATH}/exp${i}.out
docker run --gpus device=${GPUIDX} --cpus=4 --memory=30g -it --rm -v "$(pwd):/app/autograph" -w /app/autograph nehzux/kddcup2020:v2 python run_local_test.py --dataset_dir=./data/external/computers --code_dir=./code_submission --seed=${i} 2>>${RESPATH}/exp${i}.err | tee -a ${RESPATH}/exp${i}.out
docker run --gpus device=${GPUIDX} --cpus=4 --memory=30g -it --rm -v "$(pwd):/app/autograph" -w /app/autograph nehzux/kddcup2020:v2 python run_local_test.py --dataset_dir=./data/external/cora_full --code_dir=./code_submission --seed=${i} 2>>${RESPATH}/exp${i}.err | tee -a ${RESPATH}/exp${i}.out
docker run --gpus device=${GPUIDX} --cpus=4 --memory=30g -it --rm -v "$(pwd):/app/autograph" -w /app/autograph nehzux/kddcup2020:v2 python run_local_test.py --dataset_dir=./data/external/ogbn-arxiv --code_dir=./code_submission --seed=${i} 2>>${RESPATH}/exp${i}.err | tee -a ${RESPATH}/exp${i}.out
docker run --gpus device=${GPUIDX} --cpus=4 --memory=30g -it --rm -v "$(pwd):/app/autograph" -w /app/autograph nehzux/kddcup2020:v2 python run_local_test.py --dataset_dir=./data/external/photo --code_dir=./code_submission --seed=${i} 2>>${RESPATH}/exp${i}.err | tee -a ${RESPATH}/exp${i}.out
docker run --gpus device=${GPUIDX} --cpus=4 --memory=30g -it --rm -v "$(pwd):/app/autograph" -w /app/autograph nehzux/kddcup2020:v2 python run_local_test.py --dataset_dir=./data/external/pubmed --code_dir=./code_submission --seed=${i} 2>>${RESPATH}/exp${i}.err | tee -a ${RESPATH}/exp${i}.out
done
docker run --cpus=4 --memory=30g -it --rm -v "$(pwd):/app/autograph" -w /app/autograph nehzux/kddcup2020:v2 python code_submission/show_perf.py --num_exp=${NUMEXP} --res_path=${RESPATH}/ | tee ${RESPATH}/exp_summary.txt
echo "finished the regression"