Random walk with the same number of node?

Hi,there
I want to achieve contrastive learning on graph and I want to structure positive samples.
Does DGL has some graph augment API ?
And I try to use dgl.sampling.random_walk for a node two times and then get two positive samples but I can’t fixed the number of nodes.It can get two traces for one node with the same number of node??

I assume you want to get multiple traces with the same number of nodes but you were unable to do so.

Since DGL graphs are all directed, did you add reverse edges into the graph? If not, then it’s very possible that a node does not have any successor so that the random walk cannot continue.