MCPcopy
hub / github.com/dmlc/dgl / create_test_graph

Function create_test_graph

tests/python/common/test_heterograph-shared-memory.py:18–30  ·  view source on GitHub ↗
(idtype)

Source from the content-addressed store, hash-verified

16
17
18def create_test_graph(idtype):
19 g = dgl.heterograph(
20 (
21 {
22 ("user", "follows", "user"): ([0, 1], [1, 2]),
23 ("user", "plays", "game"): ([0, 1, 2, 1], [0, 0, 1, 1]),
24 ("user", "wishes", "game"): ([0, 2], [1, 0]),
25 ("developer", "develops", "game"): ([0, 1], [0, 1]),
26 }
27 ),
28 idtype=idtype,
29 )
30 return g
31
32
33def _assert_is_identical_hetero(g, g2):

Callers 3

test_single_processFunction · 0.70
test_multi_processFunction · 0.70
test_copy_from_gpuFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected