Closed j-adamczyk closed 2 years ago
Hi! This is a very weird bug, because this never happened to me, and it is not clear why your python cannot import sklearn inside the ogb package. I am using Ubuntu 16.4, Python 3.8
It definitely happens with:
Also with Ubuntu 20.04 (same versions). I killed the process after a good few minutes, so it's not just slow.
Seems to be related to this issue: https://github.com/snap-stanford/ogb/issues/322
anyupdate here? i have got the same issue. the env listed here: OS: CentOS Linux release 7.9.2009 Python: 3.9.12 ogb:1.3.3 sklearn: 1.0.2 pytorch: 1.8.0
i have checked the reply in the #322, i also found the interrupt will print the stacktrace, seems related to sklearn import, paste the stack here:
most recent call last):
File "/mnt/disk0/xjliu/pas-ogb/ogb-molhiv/extract_fingerprint.py", line 8, in
Workaround: same as the #322, i found it worked if i uninstalled the setuptools, but this will lead other runninng issue if missing this, so i hope someone can watch this, any help would be appreciated.
provide some code repo, if someone need reproduce it on your env. https://github.com/AutoML-Research/PAS-OGB
@heavenlxj error is still the same. The only workaround I found is adding from sklearn.metrics import roc_auc_score, average_precision_score
before importing OGB.
@j-adamczyk yep, it also worked for me, it's really helpful, thanks.
For me, the solution was using an older version of torch-geometric. Seems like thetorch-geometric==1.7.0
works just fine. If torch-geometric version is more important try installing ogb==1.2.1
I just (hopefully) fixed this in https://github.com/snap-stanford/ogb/pull/338. Let me know :)
I got the same error with pytorch-geometric version 2.0.4. Updating pyg to 2.0.5 worked for me.
Hi, I am still facing the exact same error, using ogb 1.3.4 and pytorch 1.8.2+cu111. I downgrade ogb 1.3.4 -> 1.2.1 as mentioned in the previous post and it works.
The bug should be resolved by version 1.3.5, you can check if upgrading the version to the latest one works.
I think there is a problem with imports in
ogb
. I tried to run the example:a
gets printed, but then Python gets stuck and does not printc
. However I tried to addprint("b")
to various points inogb
, following thefrom ogb.graphproppred import PygGraphPropPredDataset
line.To import
PygGraphPropPredDataset
, we need to run the code in__init__.py
:Even the first line does not get printed. So I went to the
evaluate.py
and there we have:And
b
does not get printed. So I addedfrom sklearn.metrics import roc_auc_score, average_precision_score
directly afterprint("a")
in the original file. After this modification it works.I had an opportunity to try this multiple times, on fresh installs of the entire OS (Windows 2 times, Linux 1 time), with three versions of Python (3.8, 3.9, 3.10) and 3 versions of PyTorch (3.9, 3.10, 3.11). The problem was identical every time, and every time adding the manual import worked.
Fixing this would be pretty nice, since this is a quickstart on the main page.