Reverse_types for as_edge_prediction_sampler not properly documentated
See original GitHub issue📚 Documentation
https://docs.dgl.ai/en/0.8.x/generated/dgl.dataloading.as_edge_prediction_sampler.html
This tutorial doesn’t mention that when passing reverse_etypes dict, it is assumed that edges of the reverse types have the same id. (e.g clicks and clicked-by)
I found this info here: https://discuss.dgl.ai/t/exclude-eids-in-edgedataloader/1552
Issue Analytics
- State:
- Created a year ago
- Comments:6
Top Results From Across the Web
dgl.dataloading.as_edge_prediction_sampler - DGL Docs
reverse_types , for excluding not only the edges in the current minibatch but also their reverse edges stored in another type according to...
Read more >dgl/minibatch-edge.rst at master · dmlc/dgl - GitHub
If each edge in a type has a reverse edge with the same ID in another type, you can specify the mapping between...
Read more >RV Document Type Reverse AB problem Field STBLG not ...
Hi Expert, we are facing problem for audit purpose ,, sales return Document Type RV in OBA7 document type Reversed type is AB, ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Let’s add clarity into doc. It’s great if you can help do this.
I don’t have runnable but I can give you an example which I encountered. Let’s say that you are loading a graph from a graph database in which nodes are connected with edges in both directions. The most logical way to convert a graph from graph databases to DGLGraph is to iterate over nodes and their
out_edgesorin_edges. It is really hard(or more to say computationally inefficient) to search for eachedgeyou encounter, its reverse edge pair and hence construct a graph in whichedgeandreverse_edgehave the sameid.