Graphsage example probability in sampling

Hi,

I am looking at the Graphsage example and in particular the sampling portion from line 197 of train_sampling_unsupervised.py

sampler = dgl.dataloading.MultiLayerNeighborSampler(
        [int(fanout) for fanout in args.fan_out.split(',')])
    dataloader = dgl.dataloading.EdgeDataLoader(
        g, train_seeds, sampler, exclude='reverse_id',
        # For each edge with ID e in Reddit dataset, the reverse edge is e ± |E|/2.
        reverse_eids=th.cat([
            th.arange(n_edges // 2, n_edges),
            th.arange(0, n_edges // 2)]),
        negative_sampler=NegativeSampler(g, args.num_negs),
        batch_size=args.batch_size,
        shuffle=True,
        drop_last=False,
        pin_memory=True,
        num_workers=args.num_workers)

Is there a way to provide edge weights as probability to this sampling mechansim? I noticed that the dgl.sampling functions are able to take as input a probability vector. However this does not seem to be the case for MultiLayerNeighborSampler.

Any help would be appreciated.

Thanks,
Faraz

For now MultiLayerNeighborSampler does not have edge weights supported. You will need to modify it by changing the sample_neighbors call inside by adding a probability vector argument.