Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion - PyG] option to load heterogeneous graphs as HeteroData #328

Open
stadlmax opened this issue May 9, 2022 · 3 comments
Open

Comments

@stadlmax
Copy link

stadlmax commented May 9, 2022

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.

@rusty1s
Copy link
Collaborator

rusty1s commented May 9, 2022

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.

@Kumbong
Copy link

Kumbong commented Mar 9, 2023

@rusty1s Do you still plan on working on this? Can I pick up this issue?

@rusty1s
Copy link
Collaborator

rusty1s commented Mar 9, 2023

Just answered you in private. I would really love to see this issue being finally integrated :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants