-
Notifications
You must be signed in to change notification settings - Fork 464
Open
Labels
bug / fixSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed
Description
🐛 Bug
I am seeing a deprecated UserWarning
being raised inside of torchmetrics. Seems like an easy fix if it hasn't already happened on your main, as the message below gives the fix.
torchmetrics/utilities/distributed.py:150: UserWarning: Using a non-tuple sequence for multidimensional indexing is deprecated and will be changed in pytorch 2.9; use x[tuple(seq)] instead of x[seq]. In pytorch 2.9 this will be interpreted as tensor index, x[torch.tensor(seq)], which will result either in an error or a different result (Triggered internally at /pytorch/torch/csrc/autograd/python_variable_indexing.cpp:306.)
gathered_result[idx] = gathered_result[idx][slice_param]
To Reproduce
Execute the function gather_all_tensors
in torchmetrics/utilities/distributed.py
.
Environment
pytorch-lightning==2.5.5
torch==2.8.0
torchmetrics==1.8.2
Metadata
Metadata
Assignees
Labels
bug / fixSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed