meta-pytorch / meta-pytorch/torchcodec

Video Encoder test_contiguity sometimes fails to produce identical tensors

Open
#1,047 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
1.2k
Forks
125
Avg merge
22h 47m
Merged PRs (30d)
54

Description

🐛 Describe the bug

Sporadically, the TestVideoEncoder.test_contiguity test fails.
Although this test passes after retrying, I'm opening this issue to track it:

FAILED test/test_encoders.py::TestVideoEncoder::test_contiguity[to_file] - AssertionError: The values for attribute 'shape' do not match: torch.Size([11027]) != torch.Size([11003]).
FAILED test/test_encoders.py::TestVideoEncoder::test_contiguity[to_tensor] - AssertionError: The values for attribute 'shape' do not match: torch.Size([11034]) != torch.Size([11003]).

Examples: 1, 2, 3

Versions

Appears on CI, observed on Windows and Linux

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with test/test_encoders.py::TestVideoEncoder::test_contiguity and run both the to_file and to_tensor cases repeatedly on the affected platforms. Compare the produced tensor shapes and inspect the encoder path used by these cases. Done means the test produces identical tensors reliably in CI on Windows and Linux.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.