meta-pytorch / meta-pytorch/data
MultiplexerLongest example snippet isn't very useful
Open
Beginner friendly
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.3k
- Forks
- 179
- Avg merge
- 6d 1h
- Merged PRs (30d)
- 2
Description
📚 The doc issue
The snippet in the docs
>>> from torchdata.datapipes.iter import IterableWrapper
>>> dp1, dp2, dp3 = IterableWrapper(range(5)), IterableWrapper(range(10, 15)), IterableWrapper(range(20, 25))
>>> list(dp1.mux_longest(dp2, dp3))
[0, 10, 20, 1, 11, 21, 2, 12, 22, 3, 13, 23, 4, 14, 24]
The three input datapipes all have the same length so the example doesn't show why this is different than Multiplexer.
Suggest a potential alternative/fix
Change the example so that one input datapipe is shorter in order to show why this is different than Multiplexer
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
Open the MultiplexerLongest documentation page linked in the issue and inspect the current example snippet. Revise the example so one input datapipe is shorter, then check that its output demonstrates why MultiplexerLongest differs from Multiplexer.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100