// In this case, NeighborSampling simply gets the neighborhood of a single vertex.for subg, aux in dgl.contrib.sampling.NeighborSampler(g, 1, 5, neighbor_type="in",
num_workers=4, return_seed_id=True):
seed_ids = aux["seeds"]assertlen(seed_ids)== 1assert subg.number_of_nodes() <= 6assert subg.number_of_edges() <= 5
verify_subgraph(g, subg, seed_ids)
After Change
// In this case, NeighborSampling simply gets the neighborhood of a single vertex.for subg in dgl.contrib.sampling.NeighborSampler(g, 1, 5, neighbor_type="in",
num_workers=4):
seed_ids = subg.layer_parent_nid(-1)assertlen(seed_ids)== 1assert subg.number_of_nodes() <= 6assert subg.number_of_edges() <= 5
verify_subgraph(g, subg, seed_ids)