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

RuntimeError while run full_batch.py #32

Closed
EvanYu800112 opened this issue Jun 2, 2020 · 2 comments
Closed

RuntimeError while run full_batch.py #32

EvanYu800112 opened this issue Jun 2, 2020 · 2 comments

Comments

@EvanYu800112
Copy link

Hi,
I run python full_batch.py on ogbn_arxiv dataset, while a runtime error occurred. I have tried searching for a solution, but I still don't know why it happened....
Has anyone run into the same problem can give some help? Thank you in advance.

RuntimeError:

init(torch.torch_sparse.storage.SparseStorage self, Tensor? row, Tensor? rowptr, Tensor? col, Tensor? value, (int, int)? sparse_sizes, Tensor? rowcount, Tensor? colptr, Tensor? colcount, Tensor? csr2csc, Tensor? csc2csr, bool is_sorted) -> (None):
Expected a value of type 'Optional[Tensor]' for argument 'row' but instead found type 'int'.
:
File "/home/Evan/PyEnv_3.7/lib/python3.7/site-packages/torch_sparse/storage.py", line 283
col = idx % num_cols

    return SparseStorage(row=row, rowptr=None, col=col, value=self._value,
           ~~~~~~~~~~~~~ <--- HERE
                         sparse_sizes=(num_rows, num_cols), rowcount=None,
                         colptr=None, colcount=None, csr2csc=None,
@rusty1s
Copy link
Collaborator

rusty1s commented Jun 2, 2020

Related to pyg-team/pytorch_geometric#1125 (comment) caused by the division op changes introduced in PyTorch 1.5. Please modify storage.py accordingly or update to PyTorch 1.5. Sorry for the inconveniences!

@EvanYu800112
Copy link
Author

I modify storage.py and it works now!!!
Thank you for your help :)

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

No branches or pull requests

2 participants