-
Notifications
You must be signed in to change notification settings - Fork 16
/
b16_5m.sh
31 lines (29 loc) · 885 Bytes
/
b16_5m.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
export MASTER_PORT=$((12000 + $RANDOM % 20000))
export OMP_NUM_THREADS=1
echo "PYTHONPATH: ${PYTHONPATH}"
which_python=$(which python)
echo "which python: ${which_python}"
export PYTHONPATH=${PYTHONPATH}:${which_python}
export PYTHONPATH=${PYTHONPATH}:.
echo "PYTHONPATH: ${PYTHONPATH}"
JOB_NAME='vit_k710pre_d512_w5m_dp0.1lr2w1e15_trimmed30'
OUTPUT_DIR="$(dirname $0)/$JOB_NAME"
LOG_DIR="$(dirname $0)/logs/${JOB_NAME}"
PARTITION='video'
NNODE=1
NUM_GPUS=8
NUM_CPU=112
srun -p ${PARTITION} \
--job-name=${JOB_NAME} \
-n${NNODE} \
--gres=gpu:${NUM_GPUS} \
--ntasks-per-node=1 \
--cpus-per-task=${NUM_CPU} \
torchrun \
--nnodes=${NNODE} \
--nproc_per_node=${NUM_GPUS} \
--rdzv_backend=c10d \
tasks/retrieval.py \
$(dirname $0)/config_dp01lr2w1e15_trimmed30.py \
pretrained_path your_model_path/b16_5m.pth \
output_dir ${OUTPUT_DIR}