meta-pytorch / meta-pytorch/torchcodec
Investigate refactoring how we return AVIOFileLikeContext
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 125
- Avg merge
- 22h 47m
- Merged PRs (30d)
- 54
Description
PR #889 refactored how we create decoders that take a file-like object. See the PR for full details. The state the code was left in, though, still has a not-great quirk that we're doing this:
- C++ creates object in
pybind_ops.cpp, does areinterpret_cast<int64_t>and returns that value to Python layer. - Python layer accepts the int and forwards that int decoder creation in
custom_ops.cpp. - C++ in
custom_ops.cppdoes areinterpet_cast<AVIOFileLikeContext*>on the int.
That's not great. The purpose of this issue is to investigate if defining an actual pybind object that wraps AVIOFileLikeContext is better.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading PR #889 for the existing decoder refactor, then trace AVIOFileLikeContext through pybind_ops.cpp and custom_ops.cpp. Investigate whether a pybind object can wrap the context instead of passing a cast integer, and document the viable approach and its implications as the outcome.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100