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

Error: Providing a bool or integral fill value without setting the optional dtype or out arguments is currently unsupported #162

Open
rinskeal opened this issue Feb 10, 2022 · 0 comments

Comments

@rinskeal
Copy link

Hi all,

I'm trying to get a graph neural network code to run on a cluster (where the code that I used, always used to work perfectly fine up to half a year ago). I have the following versions:

python 3.6.9
torch 1.6.0
torch-geometric 2.0.3
torch-scatter 2.0.5
torch-sparse 0.6.8
torchvision 0.7.0

If I run the code, I get the following error:

Traceback (most recent call last):
File "GNN_20210503_alltimes_trainsep.py", line 442, in
for train in train_dataloader:
File "/home/alkemade/.conda/envs/ML8/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 363, in next
data = self._next_data()
File "/home/alkemade/.conda/envs/ML8/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 403, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/home/alkemade/.conda/envs/ML8/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 47, in fetch
return self.collate_fn(data)
File "/home/alkemade/.conda/envs/ML8/lib/python3.7/site-packages/torch_geometric/loader/dataloader.py", line 20, in call
self.exclude_keys)
File "/home/alkemade/.conda/envs/ML8/lib/python3.7/site-packages/torch_geometric/data/batch.py", line 75, in from_data_list
exclude_keys=exclude_keys,
File "/home/alkemade/.conda/envs/ML8/lib/python3.7/site-packages/torch_geometric/data/collate.py", line 109, in collate
out_store.batch = repeat_interleave(repeats, device=device)
File "/home/alkemade/.conda/envs/ML8/lib/python3.7/site-packages/torch_geometric/data/collate.py", line 205, in repeat_interleave
outs = [torch.full((n, ), i, device=device) for i, n in enumerate(repeats)]
File "/home/alkemade/.conda/envs/ML8/lib/python3.7/site-packages/torch_geometric/data/collate.py", line 205, in
outs = [torch.full((n, ), i, device=device) for i, n in enumerate(repeats)]
RuntimeError: Providing a bool or integral fill value without setting the optional dtype or out arguments is currently unsupported. In PyTorch 1.7, when dtype and out are not set a bool fill value will return a tensor of torch.bool dtype, and an integral fill value will return a tensor of torch.long dtype.

Downscaling the versions, as is suggested to others with this problem does unfortunately not work. Does anyone know how to fix this? Thank you in advance,

Best Rinske

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

1 participant