"git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "00c76f6ff19a9667594597c37b4e3da15e9a56db"
Unverified Commit cbfc8085 authored by Hongzhi (Steve), Chen's avatar Hongzhi (Steve), Chen Committed by GitHub
Browse files

[Misc] Always use subgraph instead of sub_graph. (#6213)

parent b8e93575
...@@ -88,7 +88,7 @@ class NeighborSampler(SubgraphSampler): ...@@ -88,7 +88,7 @@ class NeighborSampler(SubgraphSampler):
self.prob_name = prob_name self.prob_name = prob_name
self.graph = graph self.graph = graph
def _sample_sub_graphs(self, seeds): def _sample_subgraphs(self, seeds):
subgraphs = [] subgraphs = []
num_layers = len(self.fanouts) num_layers = len(self.fanouts)
for hop in range(num_layers): for hop in range(num_layers):
......
...@@ -40,9 +40,7 @@ class SubgraphSampler(Mapper): ...@@ -40,9 +40,7 @@ class SubgraphSampler(Mapper):
seeds = data.seed_node seeds = data.seed_node
else: else:
raise TypeError(f"Unsupported type of data {data}.") raise TypeError(f"Unsupported type of data {data}.")
data.input_nodes, data.sampled_subgraphs = self._sample_sub_graphs( data.input_nodes, data.sampled_subgraphs = self._sample_subgraphs(seeds)
seeds
)
return data return data
def _link_prediction_preprocess(self, data): def _link_prediction_preprocess(self, data):
...@@ -105,5 +103,5 @@ class SubgraphSampler(Mapper): ...@@ -105,5 +103,5 @@ class SubgraphSampler(Mapper):
compacted_negative_tail if has_neg_dst else None, compacted_negative_tail if has_neg_dst else None,
) )
def _sample_sub_graphs(self, seeds): def _sample_subgraphs(self, seeds):
raise NotImplementedError raise NotImplementedError
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