Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Skeleton003 committed Jun 9, 2024
1 parent 52638e3 commit 2decac0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions python/dgl/graphbolt/minibatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,17 @@ def blocks(self):
"""DGL blocks extracted from `MiniBatch` containing graphical structures
and ID mappings.
"""
if not self.sampled_subgraphs:
return None

if self._blocks is None:
self._blocks = self.compute_blocks()
return self._blocks

def compute_blocks(self):
if not self.sampled_subgraphs:
return None

"""Extracts DGL blocks from `MiniBatch` to construct graphical
structures and ID mappings.
"""
is_heterogeneous = isinstance(
self.sampled_subgraphs[0].sampled_csc, Dict
)
Expand Down

0 comments on commit 2decac0

Please sign in to comment.