How can I use random walk without revisit last node?

Hey! I am trying to use DGL to build up my model. One thing I need to achieve is to use random walk build a path without revisit last node.
For instance, if node 1 link to node 2, and I am starting randomwalk from node 1, when jump to node2, when I use dgl.sampling.random_walk, there have a chance that node 2 can jump back to node1. But I what this not going to happen. How can I use DGL to achieve this?


It seems that you want a second-order random walk like that in Node2vec where p is infinity. Currently we don’t have this functionality implemented. We will let you know once we support random walk in node2vec.