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
dgl
Commits
19c6491b
Unverified
Commit
19c6491b
authored
Nov 21, 2023
by
Rhett Ying
Committed by
GitHub
Nov 21, 2023
Browse files
[DistGB] recover dist unit tests while skip unstable ones (#6582)
parent
4df2e399
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
8 deletions
+16
-8
Jenkinsfile
Jenkinsfile
+0
-1
python/dgl/graphbolt/base.py
python/dgl/graphbolt/base.py
+2
-0
tests/distributed/test_dist_graph_store.py
tests/distributed/test_dist_graph_store.py
+2
-0
tests/distributed/test_distributed_sampling.py
tests/distributed/test_distributed_sampling.py
+5
-5
tests/distributed/test_mp_dataloader.py
tests/distributed/test_mp_dataloader.py
+5
-0
tests/distributed/test_partition.py
tests/distributed/test_partition.py
+1
-1
tests/scripts/task_distributed_test.sh
tests/scripts/task_distributed_test.sh
+1
-1
No files found.
Jenkinsfile
View file @
19c6491b
...
@@ -580,7 +580,6 @@ pipeline {
...
@@ -580,7 +580,6 @@ pipeline {
steps
{
steps
{
unit_distributed_linux
(
'pytorch'
,
'cpu'
)
unit_distributed_linux
(
'pytorch'
,
'cpu'
)
}
}
when
{
expression
{
false
}
}
}
}
}
}
post
{
post
{
...
...
python/dgl/graphbolt/base.py
View file @
19c6491b
...
@@ -71,6 +71,8 @@ def etype_str_to_tuple(c_etype):
...
@@ -71,6 +71,8 @@ def etype_str_to_tuple(c_etype):
>>> print(c_etype)
>>> print(c_etype)
("user", "like", "item")
("user", "like", "item")
"""
"""
if
isinstance
(
c_etype
,
tuple
):
return
c_etype
ret
=
tuple
(
c_etype
.
split
(
CANONICAL_ETYPE_DELIMITER
))
ret
=
tuple
(
c_etype
.
split
(
CANONICAL_ETYPE_DELIMITER
))
assert
len
(
ret
)
==
3
,
(
assert
len
(
ret
)
==
3
,
(
"Passed-in canonical etype should be in format of 'str:str:str'. "
"Passed-in canonical etype should be in format of 'str:str:str'. "
...
...
tests/distributed/test_dist_graph_store.py
View file @
19c6491b
...
@@ -903,6 +903,7 @@ def test_server_client():
...
@@ -903,6 +903,7 @@ def test_server_client():
# check_server_client(True, 2, 2, 2)
# check_server_client(True, 2, 2, 2)
@
unittest
.
skip
(
reason
=
"Skip due to glitch in CI"
)
@
unittest
.
skipIf
(
os
.
name
==
"nt"
,
reason
=
"Do not support windows yet"
)
@
unittest
.
skipIf
(
os
.
name
==
"nt"
,
reason
=
"Do not support windows yet"
)
@
unittest
.
skipIf
(
@
unittest
.
skipIf
(
dgl
.
backend
.
backend_name
==
"tensorflow"
,
dgl
.
backend
.
backend_name
==
"tensorflow"
,
...
@@ -1033,6 +1034,7 @@ def test_standalone():
...
@@ -1033,6 +1034,7 @@ def test_standalone():
dgl
.
distributed
.
exit_client
()
# this is needed since there's two test here in one process
dgl
.
distributed
.
exit_client
()
# this is needed since there's two test here in one process
@
unittest
.
skip
(
reason
=
"Skip due to glitch in CI"
)
@
unittest
.
skipIf
(
@
unittest
.
skipIf
(
dgl
.
backend
.
backend_name
==
"tensorflow"
,
dgl
.
backend
.
backend_name
==
"tensorflow"
,
reason
=
"TF doesn't support distributed DistEmbedding"
,
reason
=
"TF doesn't support distributed DistEmbedding"
,
...
...
tests/distributed/test_distributed_sampling.py
View file @
19c6491b
...
@@ -292,7 +292,7 @@ def check_rpc_hetero_find_edges_shuffle(tmpdir, num_server):
...
@@ -292,7 +292,7 @@ def check_rpc_hetero_find_edges_shuffle(tmpdir, num_server):
@
unittest
.
skipIf
(
@
unittest
.
skipIf
(
dgl
.
backend
.
backend_name
==
"mxnet"
,
reason
=
"Turn off Mxnet support"
dgl
.
backend
.
backend_name
==
"mxnet"
,
reason
=
"Turn off Mxnet support"
)
)
@
pytest
.
mark
.
parametrize
(
"num_server"
,
[
1
,
2
])
@
pytest
.
mark
.
parametrize
(
"num_server"
,
[
1
])
def
test_rpc_find_edges_shuffle
(
num_server
):
def
test_rpc_find_edges_shuffle
(
num_server
):
reset_envs
()
reset_envs
()
import
tempfile
import
tempfile
...
@@ -356,7 +356,7 @@ def check_rpc_get_degree_shuffle(tmpdir, num_server):
...
@@ -356,7 +356,7 @@ def check_rpc_get_degree_shuffle(tmpdir, num_server):
@
unittest
.
skipIf
(
@
unittest
.
skipIf
(
dgl
.
backend
.
backend_name
==
"mxnet"
,
reason
=
"Turn off Mxnet support"
dgl
.
backend
.
backend_name
==
"mxnet"
,
reason
=
"Turn off Mxnet support"
)
)
@
pytest
.
mark
.
parametrize
(
"num_server"
,
[
1
,
2
])
@
pytest
.
mark
.
parametrize
(
"num_server"
,
[
1
])
def
test_rpc_get_degree_shuffle
(
num_server
):
def
test_rpc_get_degree_shuffle
(
num_server
):
reset_envs
()
reset_envs
()
import
tempfile
import
tempfile
...
@@ -375,7 +375,7 @@ def test_rpc_sampling():
...
@@ -375,7 +375,7 @@ def test_rpc_sampling():
os
.
environ
[
"DGL_DIST_MODE"
]
=
"distributed"
os
.
environ
[
"DGL_DIST_MODE"
]
=
"distributed"
with
tempfile
.
TemporaryDirectory
()
as
tmpdirname
:
with
tempfile
.
TemporaryDirectory
()
as
tmpdirname
:
check_rpc_sampling
(
Path
(
tmpdirname
),
2
)
check_rpc_sampling
(
Path
(
tmpdirname
),
1
)
def
check_rpc_sampling_shuffle
(
tmpdir
,
num_server
,
num_groups
=
1
):
def
check_rpc_sampling_shuffle
(
tmpdir
,
num_server
,
num_groups
=
1
):
...
@@ -1005,7 +1005,7 @@ def check_rpc_bipartite_etype_sampling_shuffle(tmpdir, num_server):
...
@@ -1005,7 +1005,7 @@ def check_rpc_bipartite_etype_sampling_shuffle(tmpdir, num_server):
@
unittest
.
skipIf
(
@
unittest
.
skipIf
(
dgl
.
backend
.
backend_name
==
"mxnet"
,
reason
=
"Turn off Mxnet support"
dgl
.
backend
.
backend_name
==
"mxnet"
,
reason
=
"Turn off Mxnet support"
)
)
@
pytest
.
mark
.
parametrize
(
"num_server"
,
[
1
,
2
])
@
pytest
.
mark
.
parametrize
(
"num_server"
,
[
1
])
def
test_rpc_sampling_shuffle
(
num_server
):
def
test_rpc_sampling_shuffle
(
num_server
):
reset_envs
()
reset_envs
()
import
tempfile
import
tempfile
...
@@ -1255,7 +1255,7 @@ def test_rpc_in_subgraph():
...
@@ -1255,7 +1255,7 @@ def test_rpc_in_subgraph():
os
.
environ
[
"DGL_DIST_MODE"
]
=
"distributed"
os
.
environ
[
"DGL_DIST_MODE"
]
=
"distributed"
with
tempfile
.
TemporaryDirectory
()
as
tmpdirname
:
with
tempfile
.
TemporaryDirectory
()
as
tmpdirname
:
check_rpc_in_subgraph_shuffle
(
Path
(
tmpdirname
),
2
)
check_rpc_in_subgraph_shuffle
(
Path
(
tmpdirname
),
1
)
@
unittest
.
skipIf
(
os
.
name
==
"nt"
,
reason
=
"Do not support windows yet"
)
@
unittest
.
skipIf
(
os
.
name
==
"nt"
,
reason
=
"Do not support windows yet"
)
...
...
tests/distributed/test_mp_dataloader.py
View file @
19c6491b
...
@@ -2,6 +2,7 @@ import multiprocessing as mp
...
@@ -2,6 +2,7 @@ import multiprocessing as mp
import
os
import
os
import
tempfile
import
tempfile
import
time
import
time
import
unittest
import
backend
as
F
import
backend
as
F
import
dgl
import
dgl
...
@@ -310,6 +311,7 @@ def check_neg_dataloader(g, num_server, num_workers):
...
@@ -310,6 +311,7 @@ def check_neg_dataloader(g, num_server, num_workers):
assert
p
.
exitcode
==
0
assert
p
.
exitcode
==
0
@
unittest
.
skip
(
reason
=
"Skip due to glitch in CI"
)
@
pytest
.
mark
.
parametrize
(
"num_server"
,
[
3
])
@
pytest
.
mark
.
parametrize
(
"num_server"
,
[
3
])
@
pytest
.
mark
.
parametrize
(
"num_workers"
,
[
0
,
4
])
@
pytest
.
mark
.
parametrize
(
"num_workers"
,
[
0
,
4
])
@
pytest
.
mark
.
parametrize
(
"drop_last"
,
[
True
,
False
])
@
pytest
.
mark
.
parametrize
(
"drop_last"
,
[
True
,
False
])
...
@@ -633,6 +635,7 @@ def create_random_hetero():
...
@@ -633,6 +635,7 @@ def create_random_hetero():
return
g
return
g
@
unittest
.
skip
(
reason
=
"Skip due to glitch in CI"
)
@
pytest
.
mark
.
parametrize
(
"num_server"
,
[
3
])
@
pytest
.
mark
.
parametrize
(
"num_server"
,
[
3
])
@
pytest
.
mark
.
parametrize
(
"num_workers"
,
[
0
,
4
])
@
pytest
.
mark
.
parametrize
(
"num_workers"
,
[
0
,
4
])
@
pytest
.
mark
.
parametrize
(
"dataloader_type"
,
[
"node"
,
"edge"
])
@
pytest
.
mark
.
parametrize
(
"dataloader_type"
,
[
"node"
,
"edge"
])
...
@@ -644,6 +647,7 @@ def test_dataloader(num_server, num_workers, dataloader_type):
...
@@ -644,6 +647,7 @@ def test_dataloader(num_server, num_workers, dataloader_type):
check_dataloader
(
g
,
num_server
,
num_workers
,
dataloader_type
)
check_dataloader
(
g
,
num_server
,
num_workers
,
dataloader_type
)
@
unittest
.
skip
(
reason
=
"Skip due to glitch in CI"
)
@
pytest
.
mark
.
parametrize
(
"num_server"
,
[
3
])
@
pytest
.
mark
.
parametrize
(
"num_server"
,
[
3
])
@
pytest
.
mark
.
parametrize
(
"num_workers"
,
[
0
,
4
])
@
pytest
.
mark
.
parametrize
(
"num_workers"
,
[
0
,
4
])
def
test_neg_dataloader
(
num_server
,
num_workers
):
def
test_neg_dataloader
(
num_server
,
num_workers
):
...
@@ -692,6 +696,7 @@ def start_multiple_dataloaders(
...
@@ -692,6 +696,7 @@ def start_multiple_dataloaders(
dgl
.
distributed
.
exit_client
()
dgl
.
distributed
.
exit_client
()
@
unittest
.
skip
(
reason
=
"Skip due to glitch in CI"
)
@
pytest
.
mark
.
parametrize
(
"num_dataloaders"
,
[
1
,
4
])
@
pytest
.
mark
.
parametrize
(
"num_dataloaders"
,
[
1
,
4
])
@
pytest
.
mark
.
parametrize
(
"num_workers"
,
[
0
,
1
,
4
])
@
pytest
.
mark
.
parametrize
(
"num_workers"
,
[
0
,
1
,
4
])
@
pytest
.
mark
.
parametrize
(
"dataloader_type"
,
[
"node"
,
"edge"
])
@
pytest
.
mark
.
parametrize
(
"dataloader_type"
,
[
"node"
,
"edge"
])
...
...
tests/distributed/test_partition.py
View file @
19c6491b
...
@@ -504,7 +504,7 @@ def check_partition(
...
@@ -504,7 +504,7 @@ def check_partition(
@
pytest
.
mark
.
parametrize
(
"part_method"
,
[
"metis"
,
"random"
])
@
pytest
.
mark
.
parametrize
(
"part_method"
,
[
"metis"
,
"random"
])
@
pytest
.
mark
.
parametrize
(
"num_parts"
,
[
1
,
4
])
@
pytest
.
mark
.
parametrize
(
"num_parts"
,
[
1
,
4
])
@
pytest
.
mark
.
parametrize
(
"num_trainers_per_machine"
,
[
1
,
4
])
@
pytest
.
mark
.
parametrize
(
"num_trainers_per_machine"
,
[
1
])
@
pytest
.
mark
.
parametrize
(
"load_feats"
,
[
True
,
False
])
@
pytest
.
mark
.
parametrize
(
"load_feats"
,
[
True
,
False
])
@
pytest
.
mark
.
parametrize
(
@
pytest
.
mark
.
parametrize
(
"graph_formats"
,
[
None
,
[
"csc"
],
[
"coo"
,
"csc"
],
[
"coo"
,
"csc"
,
"csr"
]]
"graph_formats"
,
[
None
,
[
"csc"
],
[
"coo"
,
"csc"
],
[
"coo"
,
"csc"
,
"csr"
]]
...
...
tests/scripts/task_distributed_test.sh
View file @
19c6491b
...
@@ -36,4 +36,4 @@ export DMLC_LOG_DEBUG=1
...
@@ -36,4 +36,4 @@ export DMLC_LOG_DEBUG=1
python3
-m
pytest
-v
--capture
=
tee-sys
--junitxml
=
pytest_distributed.xml
--durations
=
100 tests/distributed/
*
.py
||
fail
"distributed"
python3
-m
pytest
-v
--capture
=
tee-sys
--junitxml
=
pytest_distributed.xml
--durations
=
100 tests/distributed/
*
.py
||
fail
"distributed"
PYTHONPATH
=
tools:tools/distpartitioning:
$PYTHONPATH
python3
-m
pytest
-v
--capture
=
tee-sys
--junitxml
=
pytest_tools.xml
--durations
=
100 tests/tools/
*
.py
||
fail
"tools"
#
PYTHONPATH=tools:tools/distpartitioning:$PYTHONPATH python3 -m pytest -v --capture=tee-sys --junitxml=pytest_tools.xml --durations=100 tests/tools/*.py || fail "tools"
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