Closed yuhui-zh15 closed 3 years ago
Thank you for your idea! We deliberately did not print anything, because we do not want to print
No module named 'dgl'
for Pytorch Geometric users. Basically, we do not want to force our users to install both torch_geometric
and dgl
even if they just use one of them.
Whenever users want to use PygGraphPropPredDataset
, we assume the torch_geometric and its associated packages have been installed without any issue.
One idea is not to print anything if the error is the failure of importing dgl
or torch_geometric
.
I see your concerns now. So basically I just ran pip install ogb
and got an unknown ImportError. I didn't know why this error occurs and I should install any additional packages. After these modifications, I understood this error is due to missing packages, and I successfully imported it after installing torch_geometric
. I think it might be more reasonable to print something in this case?...
Closing this pull request now as the current solution is not appropriate. :)
This small edit aims to fix ogb import error but without any user notification:
Before:
After:
This might not be the best solution, but at least show something to users for debugging purposes. :)