I was trying to sample neighbors of nodes in a heterogeneous graph using the
dgl.to_block APIs in accordance with the “sample_blocks” method of the “NeighborSampler” class defined in this example. However, I run into the following error whenever I try to proceed with extracting seeds for the next block using
seeds = block.srcdata[dgl.NID]:
AssertionError: srcdata is only allowed when there is only one SRC type.
Could you please help me understand how I can possibly use these APIs to sample nodes from a heterogeneous graph?
Please let me know if there are any other methods which I could make use of for the same without converting the graph to a homogeneous graph.