question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Noisy warning raised by the collate function

See original GitHub issue

🐛 Describe the bug

After upgrading to PyTorch 1.12, I got the following warnings while collating data:

/opt/conda/lib/python3.8/site-packages/torch_geometric/data/collate.py:150: UserWarning: A
n output with one or more elements was resized since it had shape [58791], which does not 
match the required output shape [19597, 3]. This behavior is deprecated, and in a future P
yTorch release outputs will not be resized unless they have zero elements. You can explici
tly reuse an out tensor t by resizing it, inplace, to zero elements with t.resize_(0). (Tr
iggered internally at  ../aten/src/ATen/native/Resize.cpp:17.)                            
  value = torch.cat(values, dim=cat_dim or 0, out=out)

I guess the cause is the same as this one https://github.com/pytorch/pytorch/issues/71063 for PyTorch. Their fix is directly applicable to PyG.

Environment

  • PyG version: 2.0.4
  • PyTorch version: 1.12.0
  • OS: Ubuntu
  • Python version: 3.8.10
  • CUDA/cuDNN version: 11.3
  • How you installed PyTorch and PyG (conda, pip, source): pip
  • Any other relevant information (e.g., version of torch-scatter):

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
chenzheklcommented, Aug 5, 2022

@jangkj09 There is a nightly package on PyPI. But you may still need a working compiler to install it.

pip install pyg-nightly
0reactions
jangkj09commented, Aug 5, 2022

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Noisy warning raised by 'default_collate' · Issue #71063
In case default_collate runs in background/worker process (torch.utils.data.get_worker_info() returns something), out is always a 1D tensor, but ...
Read more >
transform noise words Server Configuration Option
Noise words (or stopwords) are not transformed. When a full-text query contains noise words, the query returns zero rows, and SQL Server raises ......
Read more >
Source code for opacus.data_loader
Args: collate_fn: collate function to wrap sample_empty_shapes: expected shape for a batch of size 0. Input is a sequence - one for each...
Read more >
PyTorch Datasets — lhotse 1.12.0.dev documentation
These Dataset 's expect to be handed lists of element indices, so that they can collate the data before it is passed to...
Read more >
On the definition of noise | Humanities and Social Sciences ...
I believe that noise is inevitable in today's environment…” Human. (1). People who raise their voices in inappropriate scenarios should promote ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found