[Suggestion - PyG] option to load heterogeneous graphs as HeteroData
Hi OGB-Team,
right now, heterogenous graphs are loaded as a Data objects by filling x_dict, edge_index_dict etc.. HeteroData in PyG on the other hand, stores features and edges by its node-type or edge-type identifier, e.g. node-related buffers like x are exposed as data[NODE_TYPE].buffer and edge-related buffers like edge_index are exposed as data[EDGE_TYPE].buffer.Those representations are quite similar besides basically the order of keys accessing the data, e.g. data.x_dict[NODE_TYPE] vs data[NODE_TYPE].x.
Is there any particular reason for this? If not, HeteroData would seem more flexible to me in the PyG framework, as it would allow for direct use with samplers or for transformations like to_undirected or to_homogeneous.
This is a good suggestion! For now, it should be no problem to manually convert your data into a HeteroData object but I agree that there exists no reason to not integrate PyG 2.0 features within OGB. I will try to do this.
@rusty1s Do you still plan on working on this? Can I pick up this issue?
Just answered you in private. I would really love to see this issue being finally integrated :)