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
ColossalAI
Commits
dec24561
"examples/vscode:/vscode.git/clone" did not exist on "2eb4268b4722b16defd78554960b1676255ec55f"
Commit
dec24561
authored
Mar 08, 2022
by
jiaruifang
Committed by
Frank Lee
Mar 11, 2022
Browse files
show pytest parameterize
parent
11bddb6e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
tests/test_zero_data_parallel/test_init_context.py
tests/test_zero_data_parallel/test_init_context.py
+3
-3
No files found.
tests/test_zero_data_parallel/test_init_context.py
View file @
dec24561
...
...
@@ -33,11 +33,11 @@ def run_dist(rank, world_size, port):
@
pytest
.
mark
.
dist
def
test_zero_init_context
():
world_size
=
2
@
pytest
.
mark
.
parametrize
(
"world_size"
,
[
1
,
2
,
4
])
def
test_zero_init_context
(
world_size
):
run_func
=
partial
(
run_dist
,
world_size
=
world_size
,
port
=
free_port
())
mp
.
spawn
(
run_func
,
nprocs
=
world_size
)
if
__name__
==
'__main__'
:
test_zero_init_context
()
test_zero_init_context
(
2
)
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