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

Issue with SubgraphLoader() and/or Torch #30

Open
ersanchezo opened this issue Dec 20, 2023 · 5 comments
Open

Issue with SubgraphLoader() and/or Torch #30

ersanchezo opened this issue Dec 20, 2023 · 5 comments

Comments

@ersanchezo
Copy link

Hi, I obtained this error by just running the first example train_gcn.py

Traceback (most recent call last):
File "/home/ersa/spage2vec/pyg_autoscale/examples/train_gcn.py", line 85, in
train(model, loader, optimizer)
File "/home/ersa/spage2vec/pyg_autoscale/examples/train_gcn.py", line 57, in train
for batch, *args in loader:
File "/home/ersa/miniconda3/envs/spage2vec/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 633, in next
data = self._next_data()
File "/home/ersa/miniconda3/envs/spage2vec/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 677, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/home/ersa/miniconda3/envs/spage2vec/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 54, in fetch
return self.collate_fn(data)
File "/home/ersa/miniconda3/envs/spage2vec/lib/python3.10/site-packages/torch_geometric_autoscale/loader.py", line 74, in compute_subgraph
rowptr, col, value, n_id = relabel_fn(rowptr, col, value, n_id,
File "/home/ersa/miniconda3/envs/spage2vec/lib/python3.10/site-packages/torch/_ops.py", line 502, in call
return self._op(*args, **kwargs or {})
RuntimeError: isBool() INTERNAL ASSERT FAILED at "/home/ersa/miniconda3/envs/spage2vec/lib/python3.10/site-packages/torch/include/ATen/core/ivalue.h":666, please report a bug to PyTorch.

My conda environment:
python version==3.10.13.final.0

torch 1.13.1+cu117 pypi_0 pypi
torch-cluster 1.6.3+pt20cu117 pypi_0 pypi
torch-geometric 2.4.0 pypi_0 pypi
torch-geometric-autoscale 0.0.0 pypi_0 pypi
torch-scatter 2.1.2+pt20cu117 pypi_0 pypi
torch-sparse 0.6.18+pt20cu117 pypi_0 pypi

@rusty1s
Copy link
Owner

rusty1s commented Dec 21, 2023

Thanks for reporting. What does

import torch
import torch_geometric_autoscale
relabel_fn = torch.ops.torch_geometric_autoscale.relabel_one_hop

rowptr = torch.tensor([0, 2, 3])
col = torch.tensor([0, 1, 0])
value = torch.tensor([0, 1, 2])
n_id = torch.tensor([0, 1])

relabel_fn(rowptr, col, value, n_id, True)
relabel_fn(rowptr, col, value, n_id, False)

return for you?

@ersanchezo
Copy link
Author

ersanchezo commented Dec 21, 2023

It returned this:
File "/home/ersa/spage2vec/trial_run/troubleshoot.py", line 10, in "module"
relabel_fn(rowptr, col, value, n_id, True)
File "/home/ersa/miniconda3/envs/spage2vec/lib/python3.10/site-packages/torch/_ops.py", line 502, in call
return self._op(*args, **kwargs or {})
RuntimeError: isBool() INTERNAL ASSERT FAILED at "/home/ersa/miniconda3/envs/spage2vec/lib/python3.10/site-packages/torch/include/ATen/core/ivalue.h":666, please report a bug to PyTorch.

@rusty1s
Copy link
Owner

rusty1s commented Dec 21, 2023

Can you show me the installation log when running python setup.py install? Looks like something went wrong during installation.

@ersanchezo
Copy link
Author

I accidentally deleted my conda environment, but was able to install it correctly with stable CUDA/Torch combination. Thanks for the help!

@ersanchezo ersanchezo reopened this Jan 9, 2024
@ersanchezo
Copy link
Author

I had installed an unstable version combination of CUDA and Torch and was fix restarting my conda environment. Thanks for the 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