Commit 1b069984 authored by Minjie Wang's avatar Minjie Wang
Browse files

doc for batched graph

parent c65a1e51
dgl.BatchedDGLGraph
-------------------
.. autoclass:: dgl.BatchedDGLGraph
:members:
:show-inheritance:
.. autofunction:: dgl.batch
.. autofunction:: dgl.unbatch
...@@ -5,3 +5,4 @@ Python APIs ...@@ -5,3 +5,4 @@ Python APIs
:maxdepth: 2 :maxdepth: 2
graph graph
batch
...@@ -9,7 +9,7 @@ from ._ffi.function import register_func, get_global_func, list_global_func_name ...@@ -9,7 +9,7 @@ from ._ffi.function import register_func, get_global_func, list_global_func_name
from ._ffi.base import DGLError, __version__ from ._ffi.base import DGLError, __version__
from .base import ALL from .base import ALL
from .batch import batch, unbatch from .batched_graph import *
from .generator import * from .generator import *
from .graph import DGLGraph, __MSG__, __REPR__ from .graph import DGLGraph, __MSG__, __REPR__
from .subgraph import DGLSubGraph from .subgraph import DGLSubGraph
...@@ -10,6 +10,8 @@ from . import graph_index as gi ...@@ -10,6 +10,8 @@ from . import graph_index as gi
from . import backend as F from . import backend as F
from . import utils from . import utils
__all__ = ['BatchedDGLGraph', 'batch', 'unbatch', 'split']
class BatchedDGLGraph(DGLGraph): class BatchedDGLGraph(DGLGraph):
"""The batched DGL graph. """The batched DGL graph.
...@@ -146,7 +148,7 @@ def split(graph_batch, num_or_size_splits): ...@@ -146,7 +148,7 @@ def split(graph_batch, num_or_size_splits):
pass pass
def unbatch(graph): def unbatch(graph):
"""Unbatch the graph and return a list of subgraphs. """Unbatch and return the list of graphs in this batch.
Parameters Parameters
---------- ----------
......
...@@ -6,7 +6,6 @@ import networkx as nx ...@@ -6,7 +6,6 @@ import networkx as nx
from . import backend as F from . import backend as F
from .frame import Frame, FrameRef from .frame import Frame, FrameRef
from .graph import DGLGraph from .graph import DGLGraph
from .nx_adapt import nx_init
from . import utils from . import utils
class DGLSubGraph(DGLGraph): class DGLSubGraph(DGLGraph):
......
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