deepspeedai / deepspeedai/DeepSpeed
[REQUEST] Any plan to refactor those huge classes?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 43.1k
- Forks
- 5k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 112
Description
I don't know whether DeepSpeed is planning to do large refactor, if not, below is my suggestion.
Is your feature request related to a problem? Please describe.
Thanks for this great project, DeepSpeed is wonderful incredible powerful.
But i found its python codes full of large even huge classes, as DeepSpeed turned more powerful, classes become larger and hard to read or maintain.
Describe the solution you'd like
I think Instead of adding more new features, it is better to do more refactor, or in the near future, DeepSpeed will be hard to maintain, hard to debug or add even little new feature.
DeepSpeed is mainly manipulating data/weight, if refactor it by DOP(data oriented programming), the code should be much better to read and maintain.
There is a good book of data oriented programming: https://livebook.manning.com/book/data-oriented-programming/chapter-1/v-13/
Describe alternatives you've considered
DOP can live with OOP, so refactor can go on many steps.
Or just refactor the large classes to smaller modular classes should be also great.
I found fairscale(https://github.com/facebookresearch/fairscale) has similar functions with DeepSpeed, but its codes are much simpler.
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
The issue does not name files, classes, tests, or an entry point. Start by surveying the large Python classes in DeepSpeed and comparing the relevant areas with FairScale, then establish a specific refactoring scope and acceptance criteria. Done would require an agreed, modular refactor rather than a general proposal.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100