bea07b41b3429f841ed1599ed25bd40ea86ac9da,tests/compute/test_sampler.py,,test_1neighbor_sampler,#,50

Before Change


    // 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"]
        assert len(seed_ids) == 1
        assert subg.number_of_nodes() <= 6
        assert 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)
        assert len(seed_ids) == 1
        assert subg.number_of_nodes() <= 6
        assert subg.number_of_edges() <= 5
        verify_subgraph(g, subg, seed_ids)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 6

Non-data size: 5

Instances


Project Name: dmlc/dgl
Commit Name: bea07b41b3429f841ed1599ed25bd40ea86ac9da
Time: 2019-02-28
Author: zhengda1936@gmail.com
File Name: tests/compute/test_sampler.py
Class Name:
Method Name: test_1neighbor_sampler


Project Name: dmlc/dgl
Commit Name: bea07b41b3429f841ed1599ed25bd40ea86ac9da
Time: 2019-02-28
Author: zhengda1936@gmail.com
File Name: tests/compute/test_sampler.py
Class Name:
Method Name: test_prefetch_neighbor_sampler


Project Name: dmlc/dgl
Commit Name: bea07b41b3429f841ed1599ed25bd40ea86ac9da
Time: 2019-02-28
Author: zhengda1936@gmail.com
File Name: tests/compute/test_sampler.py
Class Name:
Method Name: test_1neighbor_sampler_all


Project Name: dmlc/dgl
Commit Name: bea07b41b3429f841ed1599ed25bd40ea86ac9da
Time: 2019-02-28
Author: zhengda1936@gmail.com
File Name: examples/mxnet/sse/sse_batch.py
Class Name:
Method Name: main


Project Name: dmlc/dgl
Commit Name: bea07b41b3429f841ed1599ed25bd40ea86ac9da
Time: 2019-02-28
Author: zhengda1936@gmail.com
File Name: tests/compute/test_sampler.py
Class Name:
Method Name: test_10neighbor_sampler_all


Project Name: dmlc/dgl
Commit Name: bea07b41b3429f841ed1599ed25bd40ea86ac9da
Time: 2019-02-28
Author: zhengda1936@gmail.com
File Name: tests/compute/test_sampler.py
Class Name:
Method Name: check_10neighbor_sampler