Open stadlmax opened 2 years ago
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 :)
Hi OGB-Team, right now, heterogenous graphs are loaded as a
Data
objects by fillingx_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 likex
are exposed asdata[NODE_TYPE].buffer
and edge-related buffers likeedge_index
are exposed asdata[EDGE_TYPE].buffer
.Those representations are quite similar besides basically the order of keys accessing the data, e.g.data.x_dict[NODE_TYPE]
vsdata[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 liketo_undirected
orto_homogeneous
.