deepspeedai / deepspeedai/DeepSpeed
[Question] Design of DeepSpeedDataLoader's __iter__ and __next__
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 43.1k
- Forks
- 5k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 112
Description
I have a question about DeepSpeedDataLoader:
https://github.com/microsoft/DeepSpeed/blob/cd4e473ee613a3c5d0b70769c5ec19a7fc8a453b/deepspeed/runtime/dataloader.py#L108-L159
Why DeepSpeedDataLoader create a dataloader in __iter__ and store all data in self.data? What's the difference from iterate self.dataloader directly?
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 with deepspeed/runtime/dataloader.py lines 108-159, focusing on DeepSpeedDataLoader.iter, next, self.data, and self.dataloader. Compare this behavior with direct iteration and inspect nearby usage to establish the intended rationale. Done means the design is explained clearly, or the issue is updated with a specific documentation change if one is needed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data, machine-learning
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 18/100