Skip to content

Conversation

@NicolasHug
Copy link
Contributor

Closes #748

We started getting warnings in main due to torch not allowing lists for multi-indexing anymore:

test/test_frame_dataclasses.py::test_framebatch_indexing
  /home/nicolashug/dev/torchcodec/src/torchcodec/_frame.py:107: 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.)
    data=self.data[key],

It's our tests we need to change, not our indexing code in frame.py. I can confirm the warnings aren't visible locally anymore (they were before).

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jul 3, 2025
@NicolasHug NicolasHug merged commit 62ee42d into meta-pytorch:main Jul 3, 2025
40 of 44 checks passed
Dan-Flores pushed a commit to Dan-Flores/torchcodec that referenced this pull request Jul 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecated indexing warning

3 participants