question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Program halts whenever trying to import ogb.graphproppred

See original GitHub issue

Hi I am able to run from torch_geometric.data import InMemoryDataset successfully. But whenever I try to import anything from ogb, the program stuck for infinite time. Import code is: from ogb.graphproppred import Evaluator

I followed the following command to install torch in conda environment:

CUDA=cu113 TORCH=1.11.0 pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html pip install torch-cluster -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html pip install torch-spline-conv -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html pip install torch-geometric Note that, I am using Ubuntu. My Nvidia-smi output:

$ nvidia-smi Wed Apr 20 05:09:04 2022
±----------------------------------------------------------------------------+ | NVIDIA-SMI 450.119.03 Driver Version: 450.119.03 CUDA Version: 11.0 | |-------------------------------±---------------------±---------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |===============================+======================+======================| | 0 GeForce GTX 1070 Off | 00000000:01:00.0 On | N/A | | 27% 36C P8 9W / 151W | 1227MiB / 8116MiB | 1% Default | | | | N/A

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
faysalhossain2007commented, Apr 22, 2022

Thanks for the help! At last I am able to run the code with small dataset with a few modification to the code.

0reactions
faysalhossain2007commented, Apr 22, 2022

Thought of other might get help so posting here my detailed approach:

conda create --name=pyg9 python=3.9
conda activate pyg9
conda install pyg -c pyg
conda install torchvision
conda install ogb

In main.py => I move from ogb.graphproppred import Evaluator to the beginning of the file

In src/data/dataloader.py =>

import torch
from torch.utils.data.dataloader import default_collate
from torch_geometric.data import Data, Batch
from torch._six import  string_classes
import collections.abc as container_abcs

In Line 44: I applied the following modifications:

elif isinstance(elem, int_classes): changed to elif isinstance(elem, int):

Read more comments on GitHub >

github_iconTop Results From Across the Web

The problem of loading OGB dataset - Deep Graph Library
When I using the following code (as shown in 4.5 Loading OGB datasets using ogb ... import dgl import torch from ogb.graphproppred import...
Read more >
OGB dataset, I can not import "PygNodePropPredDataset ...
I found the answer in this pyg issue. It says that you are probably missing required deppendencies: torch_geometric, torch_scatter and ...
Read more >
ogb - PyPI
The Open Graph Benchmark (OGB) is a collection of benchmark datasets, data loaders, and evaluators for graph machine learning. Datasets cover a variety...
Read more >
Graph Property Prediction - Open Graph Benchmark
from ogb.graphproppred.mol_encoder import AtomEncoder, BondEncoder atom_encoder ... New Paradigms, and Reflections on Programming and Software, pp.
Read more >
Access S3 using Session token - Juicedata/Juicefs - IssueHint
Program halts whenever trying to import ogb.graphproppred, 6, 2022-04-21, 2022-09-09. Eliminate ambiguity by using consistent icons, 0, 2022-08-11 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found