Skip to content

Commit 6ea00d2

Browse files
[Fix] Fix local rank (#1558)
* update * update
1 parent f5b7a97 commit 6ea00d2

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

docs/getting_started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ You can use the following commands to test a dataset.
7272
# single-gpu testing
7373
python tools/test.py ${CONFIG_FILE} ${CHECKPOINT_FILE} [--out ${RESULT_FILE}] [--eval ${EVAL_METRICS}] \
7474
[--gpu-collect] [--tmpdir ${TMPDIR}] [--options ${OPTIONS}] [--average-clips ${AVG_TYPE}] \
75-
[--launcher ${JOB_LAUNCHER}] [--local-rank ${LOCAL_RANK}] [--onnx] [--tensorrt]
75+
[--launcher ${JOB_LAUNCHER}] [--local_rank ${LOCAL_RANK}] [--onnx] [--tensorrt]
7676

7777
# multi-gpu testing
7878
./tools/dist_test.sh ${CONFIG_FILE} ${CHECKPOINT_FILE} ${GPU_NUM} [--out ${RESULT_FILE}] [--eval ${EVAL_METRICS}] \
7979
[--gpu-collect] [--tmpdir ${TMPDIR}] [--options ${OPTIONS}] [--average-clips ${AVG_TYPE}] \
80-
[--launcher ${JOB_LAUNCHER}] [--local-rank ${LOCAL_RANK}]
80+
[--launcher ${JOB_LAUNCHER}] [--local_rank ${LOCAL_RANK}]
8181
```
8282

8383
Optional arguments:

docs_zh_CN/getting_started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ MMAction2 支持仅使用 CPU 进行测试。然而,这样做的速度**非常
7171
# 单 GPU 测试
7272
python tools/test.py ${CONFIG_FILE} ${CHECKPOINT_FILE} [--out ${RESULT_FILE}] [--eval ${EVAL_METRICS}] \
7373
[--gpu-collect] [--tmpdir ${TMPDIR}] [--options ${OPTIONS}] [--average-clips ${AVG_TYPE}] \
74-
[--launcher ${JOB_LAUNCHER}] [--local-rank ${LOCAL_RANK}] [--onnx] [--tensorrt]
74+
[--launcher ${JOB_LAUNCHER}] [--local_rank ${LOCAL_RANK}] [--onnx] [--tensorrt]
7575

7676
# 多 GPU 测试
7777
./tools/dist_test.sh ${CONFIG_FILE} ${CHECKPOINT_FILE} ${GPU_NUM} [--out ${RESULT_FILE}] [--eval ${EVAL_METRICS}] \
7878
[--gpu-collect] [--tmpdir ${TMPDIR}] [--options ${OPTIONS}] [--average-clips ${AVG_TYPE}] \
79-
[--launcher ${JOB_LAUNCHER}] [--local-rank ${LOCAL_RANK}]
79+
[--launcher ${JOB_LAUNCHER}] [--local_rank ${LOCAL_RANK}]
8080
```
8181

8282
可选参数:

tools/misc/clip_feature_extraction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def parse_args():
5959
choices=['none', 'pytorch', 'slurm', 'mpi'],
6060
default='none',
6161
help='job launcher')
62-
parser.add_argument('--local-rank', type=int, default=0)
62+
parser.add_argument('--local_rank', type=int, default=0)
6363
args = parser.parse_args()
6464
if 'LOCAL_RANK' not in os.environ:
6565
os.environ['LOCAL_RANK'] = str(args.local_rank)

tools/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def parse_args():
8989
choices=['none', 'pytorch', 'slurm', 'mpi'],
9090
default='none',
9191
help='job launcher')
92-
parser.add_argument('--local-rank', type=int, default=0)
92+
parser.add_argument('--local_rank', type=int, default=0)
9393
parser.add_argument(
9494
'--onnx',
9595
action='store_true',

tools/train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def parse_args():
7474
choices=['none', 'pytorch', 'slurm', 'mpi'],
7575
default='none',
7676
help='job launcher')
77-
parser.add_argument('--local-rank', type=int, default=0)
77+
parser.add_argument('--local_rank', type=int, default=0)
7878
args = parser.parse_args()
7979
if 'LOCAL_RANK' not in os.environ:
8080
os.environ['LOCAL_RANK'] = str(args.local_rank)

0 commit comments

Comments
 (0)