Unverified Commit 3132da28 authored by peizhou001's avatar peizhou001 Committed by GitHub
Browse files

Deprecate (#4864)

rename DGLHeteroGraph to DGLGraph
parent ee9887d6
......@@ -19,7 +19,7 @@ def prepare_tensor(g, data, name):
Parameters
----------
g : DGLHeteroGraph
g : DGLGraph
Graph.
data : int, iterable of int, tensor
Data.
......@@ -77,7 +77,7 @@ def prepare_tensor_dict(g, data, name):
Parameters
----------
g : DGLHeteroGraph
g : DGLGraph
Graph.
data : dict[str, (int, iterable of int, tensor)]
Data dict.
......@@ -99,7 +99,7 @@ def prepare_tensor_or_dict(g, data, name):
Parameters
----------
g : DGLHeteroGraph
g : DGLGraph
Graph.
data : dict[str, (int, iterable of int, tensor)]
Data dict.
......
......@@ -620,7 +620,7 @@ def expand_as_pair(input_, g=None):
----------
input_ : Tensor, dict[str, Tensor], or their pairs
The input features
g : DGLHeteroGraph or DGLGraph or None
g : DGLGraph or None
The graph.
If None, skip checking if the graph is a block.
......
......@@ -13,7 +13,7 @@ EdgeSpace = namedtuple("EdgeSpace", ["data"])
class HeteroNodeView(object):
"""A NodeView class to act as G.nodes for a DGLHeteroGraph."""
"""A NodeView class to act as G.nodes for a DGLGraph."""
__slots__ = ["_graph", "_typeid_getter"]
......@@ -140,7 +140,7 @@ class HeteroNodeDataView(MutableMapping):
class HeteroEdgeView(object):
"""A EdgeView class to act as G.edges for a DGLHeteroGraph."""
"""A EdgeView class to act as G.edges for a DGLGraph."""
__slots__ = ["_graph"]
......
......@@ -48,7 +48,7 @@ def check_equivalence_between_heterographs(g1, g2, node_attrs=None, edge_attrs=N
@pytest.mark.parametrize('gs', get_cases(['two_hetero_batch']))
@parametrize_idtype
def test_topology(gs, idtype):
"""Test batching two DGLHeteroGraphs where some nodes are isolated in some relations"""
"""Test batching two DGLGraphs where some nodes are isolated in some relations"""
g1, g2 = gs
g1 = g1.astype(idtype).to(F.ctx())
g2 = g2.astype(idtype).to(F.ctx())
......@@ -112,7 +112,7 @@ def test_topology(gs, idtype):
@parametrize_idtype
def test_batching_batched(idtype):
"""Test batching a DGLHeteroGraph and a BatchedDGLHeteroGraph."""
"""Test batching a DGLGraph and a batched DGLGraph."""
g1 = dgl.heterograph({
('user', 'follows', 'user'): ([0, 1], [1, 2]),
('user', 'plays', 'game'): ([0, 1], [0, 0])
......@@ -170,7 +170,7 @@ def test_batching_batched(idtype):
@parametrize_idtype
def test_features(idtype):
"""Test the features of batched DGLHeteroGraphs"""
"""Test the features of batched DGLGraphs"""
g1 = dgl.heterograph({
('user', 'follows', 'user'): ([0, 1], [1, 2]),
('user', 'plays', 'game'): ([0, 1], [0, 0])
......@@ -245,7 +245,7 @@ def test_features(idtype):
@unittest.skipIf(F.backend_name == 'mxnet', reason="MXNet does not support split array with zero-length segment.")
@parametrize_idtype
def test_empty_relation(idtype):
"""Test the features of batched DGLHeteroGraphs"""
"""Test the features of batched DGLGraphs"""
g1 = dgl.heterograph({
('user', 'follows', 'user'): ([0, 1], [1, 2]),
('user', 'plays', 'game'): ([], [])
......
......@@ -122,7 +122,7 @@ def test_pickling_batched_heterograph():
g2.nodes['game'].data['g_h'] = F.randn((2, 5))
g2.edges['plays'].data['p_h'] = F.randn((4, 6))
bg = dgl.batch_hetero([g, g2])
bg = dgl.batch([g, g2])
new_bg = _reconstruct_pickle(bg)
test_utils.check_graph_equal(bg, new_bg)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment