Graph-Learning-Benchmarks/gli

[BUG] ogg-molpcba has 2-D labels

Closed this issue · 4 comments

As titled.

To Reproduce

from dgl.dataloading import GraphDataLoader
from gli.utils import to_dense
import gli
data = gli.dataloading.get_gli_dataset("ogbg-molpcba", "GraphClassification")
train_data = data[0]
train_loader = GraphDataLoader(train_data, batch_size=128)
for batch, (batched_graph, labels) in enumerate(train_loader):
    print(labels)
    print(labels.shape)
    break

results:

Processing graphs: 100%|██████████████████████████████████████████████████████████████████████████████████████████| 437929/437929 [01:19<00:00, 5511.20it/s]
tensor([[0., 0., nan,  ..., nan, nan, nan],
        [0., 0., nan,  ..., nan, nan, nan],
        [nan, 0., nan,  ..., nan, nan, nan],
        ...,
        [0., 0., 0.,  ..., nan, nan, nan],
        [0., 0., nan,  ..., nan, nan, nan],
        [nan, nan, nan,  ..., nan, nan, nan]], dtype=torch.float64)
torch.Size([128, 128])

Expected behavior

The label is 1-D

This issue may have something to do with #271

This issue may have something to do with #271

I think this behavior has nothing to do with gli. The graph_class attribute in ogbg-molpbca is already 2-d rather than 1-d. @tu-yiwen

Got it! I'll check that today.

The labels have no problem. It will be dealt in benchmarking.