From ef23c624f998078717eddc4a9d38778d0a9393d7 Mon Sep 17 00:00:00 2001 From: wutongshenqiu <690364065@qq.com> Date: Mon, 7 Mar 2022 21:37:14 +0800 Subject: [PATCH] add PYTHONPATH --- tools/mmcls/dist_search.sh | 1 + tools/mmcls/dist_test.sh | 1 + tools/mmcls/dist_train.sh | 1 + tools/mmdet/dist_search.sh | 1 + tools/mmdet/dist_test.sh | 1 + tools/mmdet/dist_train.sh | 1 + tools/mmseg/dist_test.sh | 1 + tools/mmseg/dist_train.sh | 1 + 8 files changed, 8 insertions(+) diff --git a/tools/mmcls/dist_search.sh b/tools/mmcls/dist_search.sh index 1fe74125b..c45483919 100644 --- a/tools/mmcls/dist_search.sh +++ b/tools/mmcls/dist_search.sh @@ -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} diff --git a/tools/mmcls/dist_test.sh b/tools/mmcls/dist_test.sh index 2134021c6..9749e54d7 100644 --- a/tools/mmcls/dist_test.sh +++ b/tools/mmcls/dist_test.sh @@ -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} diff --git a/tools/mmcls/dist_train.sh b/tools/mmcls/dist_train.sh index b50ac0193..0b6fadcf9 100644 --- a/tools/mmcls/dist_train.sh +++ b/tools/mmcls/dist_train.sh @@ -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} diff --git a/tools/mmdet/dist_search.sh b/tools/mmdet/dist_search.sh index ecaa803ca..510447c02 100644 --- a/tools/mmdet/dist_search.sh +++ b/tools/mmdet/dist_search.sh @@ -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} diff --git a/tools/mmdet/dist_test.sh b/tools/mmdet/dist_test.sh index 1b0cda48e..e710ba9fc 100644 --- a/tools/mmdet/dist_test.sh +++ b/tools/mmdet/dist_test.sh @@ -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} diff --git a/tools/mmdet/dist_train.sh b/tools/mmdet/dist_train.sh index e1210ddf0..16d3167f4 100644 --- a/tools/mmdet/dist_train.sh +++ b/tools/mmdet/dist_train.sh @@ -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} diff --git a/tools/mmseg/dist_test.sh b/tools/mmseg/dist_test.sh index 43cb93e9a..2e1d6ddd0 100644 --- a/tools/mmseg/dist_test.sh +++ b/tools/mmseg/dist_test.sh @@ -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} diff --git a/tools/mmseg/dist_train.sh b/tools/mmseg/dist_train.sh index 8e6310548..c38ef173e 100644 --- a/tools/mmseg/dist_train.sh +++ b/tools/mmseg/dist_train.sh @@ -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}