meta-pytorch / meta-pytorch/data
Mux with MPRS causes operations after sharding_round_robin_dispatcher to run on the same worker
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
This doesn't seem to be mentioned in the docs, but if you have two datapipes that use sharding_round_robin_dispatcher and then mux them together:
- Any steps between
sharding_round_robin_dispatcherandmuxwill take place on the same worker process. - Only the steps after the
muxwill take place on separate workers.
For example, with the below graph, the Mapper nodes in between the ShardingRoundRobinDispatcher nodes and Multiplexer run on the same worker process. The Mapper node after Multiplexer will run across multiple processes as they're fed data in a round-robin fashion.
My incorrect expectation was that the dispatching process would distribute data to worker processes immediately after sharding_round_robin_dispatch as usual, and then everything after mux would take place on either one or multiple worker processes.
Suggest a potential alternative/fix
The documentation for Multiplexer, ShardingRoundRobinDispatcher, and/or MultiProcessingReadingService should be updated to clarify what the intended behavior is here.
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 the existing documentation for Multiplexer, ShardingRoundRobinDispatcher, and MultiProcessingReadingService, then compare it with the reported graph behavior. Update the relevant documentation to explain which operations run on the same worker before mux and which run across workers after it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100