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

OGBDataset ogbg-molhiv has wrong shape of edge features #223

Open
chrisn-pik opened this issue Oct 12, 2023 · 2 comments · May be fixed by #226
Open

OGBDataset ogbg-molhiv has wrong shape of edge features #223

chrisn-pik opened this issue Oct 12, 2023 · 2 comments · May be fixed by #226
Assignees

Comments

@chrisn-pik
Copy link

Wrong dimension of edge features, there are 6 edge features, but 3 should be correct

using MLDatasets, DataFrames

data = OGBDataset("ogbg-molhiv")
size(data[1].graphs.edge_data.features)

returns

(6, 20)

However,

data[1].graphs.num_edges

returns

40

I assume the correct size of the edge features would be (3,40) instead of (6,20)

I am using DataFrames v1.6.1 and MLDatasets v0.7.14

Using python and obg, the shape is (40,3):

from ogb.graphproppred import PygGraphPropPredDataset
dataset = PygGraphPropPredDataset(name = "ogbg-molhiv", root = '.')
dataset[0].edge_attr.shape
torch.Size([40, 3])

and

dataset[0].edge_index.shape
torch.Size([2, 40])
@CarloLucibello
Copy link
Member

it seems likely that the graph is undirected, and when converting it to a directed one we forgot to duplicate the edge features. Would you like to file a PR with a fix? I can give some indirections

@chrisn-pik
Copy link
Author

Thanks for your fast reply. That sounds like a reasonable explanation. I am not sure, if I will have the time, but providing some directions sounds good in any case.

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

Successfully merging a pull request may close this issue.

3 participants