-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathslurm_trainval.sh
52 lines (43 loc) · 1.41 KB
/
slurm_trainval.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
#!/usr/bin/env bash
set -x
PARTITION=$1
JOB_NAME=$2
GPUS=$3
PY_ARGS=${@:4}
GPUS_PER_NODE=${GPUS_PER_NODE:-8}
CPUS_PER_TASK=${CPUS_PER_TASK:-5}
while true
do
PORT=$(( ((RANDOM<<15)|RANDOM) % 49152 + 10000 ))
status="$(nc -z 127.0.0.1 $PORT < /dev/null &>/dev/null; echo $?)"
if [ "${status}" != "0" ]; then
break;
fi
done
echo $PORT
CFG_NAME=waymo_centerpoint_voxelnet_3x
srun -p ${PARTITION} \
--job-name=${JOB_NAME} \
--gres=gpu:${GPUS_PER_NODE} \
--ntasks=${GPUS} \
--ntasks-per-node=${GPUS_PER_NODE} \
--cpus-per-task=${CPUS_PER_TASK} \
--kill-on-bad-exit=1 \
python -u ./tools/train.py --launcher slurm --tcp_port $PORT configs/waymo/voxelnet/$CFG_NAME.py
CFG_NAME=waymo_centerpoint_voxelnet_graphrcnn_6epoch_freeze
srun -p ${PARTITION} \
--job-name=${JOB_NAME} \
--gres=gpu:${GPUS_PER_NODE} \
--ntasks=${GPUS} \
--ntasks-per-node=${GPUS_PER_NODE} \
--cpus-per-task=${CPUS_PER_TASK} \
--kill-on-bad-exit=1 \
python -u ./tools/train.py --launcher slurm --tcp_port $PORT configs/waymo/voxelnet/two_stage/$CFG_NAME.py
srun -p ${PARTITION} \
--job-name=${JOB_NAME} \
--gres=gpu:1 \
--ntasks=1 \
--ntasks-per-node=1 \
--cpus-per-task=${CPUS_PER_TASK} \
--kill-on-bad-exit=1 \
python ./tools/dist_test.py configs/waymo/voxelnet/two_stage/$CFG_NAME.py --work_dir work_dirs/$CFG_NAME --checkpoint work_dirs/$CFG_NAME/latest.pth