Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
mmdetection3d
Commits
74bbc075
Unverified
Commit
74bbc075
authored
Apr 26, 2023
by
Sun Jiahao
Committed by
GitHub
Apr 26, 2023
Browse files
[Fix] Fix local-rank argument in test(#2469)
* fix local rank in test 2 * fix test.py
parent
37055ca9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
tools/test.py
tools/test.py
+4
-1
No files found.
tools/test.py
View file @
74bbc075
...
@@ -57,7 +57,10 @@ def parse_args():
...
@@ -57,7 +57,10 @@ def parse_args():
help
=
'job launcher'
)
help
=
'job launcher'
)
parser
.
add_argument
(
parser
.
add_argument
(
'--tta'
,
action
=
'store_true'
,
help
=
'Test time augmentation'
)
'--tta'
,
action
=
'store_true'
,
help
=
'Test time augmentation'
)
parser
.
add_argument
(
'--local_rank'
,
type
=
int
,
default
=
0
)
# When using PyTorch version >= 2.0.0, the `torch.distributed.launch`
# will pass the `--local-rank` parameter to `tools/test.py` instead
# of `--local_rank`.
parser
.
add_argument
(
'--local_rank'
,
'--local-rank'
,
type
=
int
,
default
=
0
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
if
'LOCAL_RANK'
not
in
os
.
environ
:
if
'LOCAL_RANK'
not
in
os
.
environ
:
os
.
environ
[
'LOCAL_RANK'
]
=
str
(
args
.
local_rank
)
os
.
environ
[
'LOCAL_RANK'
]
=
str
(
args
.
local_rank
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment