forked from open-mmlab/mmsegmentation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feature] Add multi machine
dist_train
. (open-mmlab#1383)
* Add training startup documentation * fix * fix * fix * fix * fix * fix * fix * fix * fix
- Loading branch information
1 parent
786a9f7
commit 415b20f
Showing
5 changed files
with
205 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,20 @@ | ||
#!/usr/bin/env bash | ||
|
||
CONFIG=$1 | ||
CHECKPOINT=$2 | ||
GPUS=$3 | ||
NNODES=${NNODES:-1} | ||
NODE_RANK=${NODE_RANK:-0} | ||
PORT=${PORT:-29500} | ||
MASTER_ADDR=${MASTER_ADDR:-"127.0.0.1"} | ||
|
||
PYTHONPATH="$(dirname $0)/..":$PYTHONPATH \ | ||
python -m torch.distributed.launch --nproc_per_node=$GPUS --master_port=$PORT \ | ||
$(dirname "$0")/test.py $CONFIG $CHECKPOINT --launcher pytorch ${@:4} | ||
python -m torch.distributed.launch \ | ||
--nnodes=$NNODES \ | ||
--node_rank=$NODE_RANK \ | ||
--master_addr=$MASTER_ADDR \ | ||
--nproc_per_node=$GPUS \ | ||
--master_port=$PORT \ | ||
$(dirname "$0")/test.py \ | ||
$CONFIG \ | ||
$CHECKPOINT \ | ||
--launcher pytorch \ | ||
${@:4} |
Oops, something went wrong.