Skip to content

Commit

Permalink
add PYTHONPATH
Browse files Browse the repository at this point in the history
  • Loading branch information
wutongshenqiu committed Mar 7, 2022
1 parent 4623b10 commit ef23c62
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions tools/mmcls/dist_search.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ CHECKPOINT=$2
GPUS=$3
PORT=${PORT:-29500}

PYTHONPATH="$(dirname $0)/../..":$PYTHONPATH \
python -m torch.distributed.launch --nproc_per_node=$GPUS --master_port=$PORT \
$(dirname "$0")/search_mmcls.py $CONFIG $CHECKPOINT --launcher pytorch ${@:4}
1 change: 1 addition & 0 deletions tools/mmcls/dist_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ CHECKPOINT=$2
GPUS=$3
PORT=${PORT:-29500}

PYTHONPATH="$(dirname $0)/../..":$PYTHONPATH \
python -m torch.distributed.launch --nproc_per_node=$GPUS --master_port=$PORT \
$(dirname "$0")/test_mmcls.py $CONFIG $CHECKPOINT --launcher pytorch ${@:4}
1 change: 1 addition & 0 deletions tools/mmcls/dist_train.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ CONFIG=$1
GPUS=$2
PORT=${PORT:-29500}

PYTHONPATH="$(dirname $0)/../..":$PYTHONPATH \
python -m torch.distributed.launch --nproc_per_node=$GPUS --master_port=$PORT \
$(dirname "$0")/train_mmcls.py $CONFIG --launcher pytorch ${@:3}
1 change: 1 addition & 0 deletions tools/mmdet/dist_search.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ CHECKPOINT=$2
GPUS=$3
PORT=${PORT:-29500}

PYTHONPATH="$(dirname $0)/../..":$PYTHONPATH \
python -m torch.distributed.launch --nproc_per_node=$GPUS --master_port=$PORT \
$(dirname "$0")/search_mmdet.py $CONFIG $CHECKPOINT --launcher pytorch ${@:4}
1 change: 1 addition & 0 deletions tools/mmdet/dist_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ CHECKPOINT=$2
GPUS=$3
PORT=${PORT:-29500}

PYTHONPATH="$(dirname $0)/../..":$PYTHONPATH \
python -m torch.distributed.launch --nproc_per_node=$GPUS --master_port=$PORT \
$(dirname "$0")/test_mmdet.py $CONFIG $CHECKPOINT --launcher pytorch ${@:4}
1 change: 1 addition & 0 deletions tools/mmdet/dist_train.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ CONFIG=$1
GPUS=$2
PORT=${PORT:-29500}

PYTHONPATH="$(dirname $0)/../..":$PYTHONPATH \
python -m torch.distributed.launch --nproc_per_node=$GPUS --master_port=$PORT \
$(dirname "$0")/train_mmdet.py $CONFIG --launcher pytorch ${@:3}
1 change: 1 addition & 0 deletions tools/mmseg/dist_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ CHECKPOINT=$2
GPUS=$3
PORT=${PORT:-29500}

PYTHONPATH="$(dirname $0)/../..":$PYTHONPATH \
python -m torch.distributed.launch --nproc_per_node=$GPUS --master_port=$PORT \
$(dirname "$0")/test_mmseg.py $CONFIG $CHECKPOINT --launcher pytorch ${@:4}
1 change: 1 addition & 0 deletions tools/mmseg/dist_train.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ CONFIG=$1
GPUS=$2
PORT=${PORT:-29500}

PYTHONPATH="$(dirname $0)/../..":$PYTHONPATH \
python -m torch.distributed.launch --nproc_per_node=$GPUS --master_port=$PORT \
$(dirname "$0")/train_mmseg.py $CONFIG --launcher pytorch ${@:3}

0 comments on commit ef23c62

Please # to comment.