[REQUEST] Add pipeline section in `config.json` for pp
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- python
- Domain
- distributed-systems, machine-learning
Research direction
Start with get_pipeline_config in deepspeed/runtime/config.py, then read PipelineModule in deepspeed/runtime/pipe/module.py and the engine selection in deepspeed.initialize(). Trace how partitioning currently occurs in PipelineModule.init and how deepspeed/runtime/pipe/engine.py reads pipeline settings. Done means the existing pipeline keys configure stages, partitioning, and schedule while constructor-based behavior remains valid when configuration is absent.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
The pipeline section of config.json controls only part of pipeline parallelism. The engine reads activation_checkpoint_interval, pipe_partitioned, grad_partitioned and use_reentrant from it. The number of stages, the partition method and the schedule are set in Python, through the PipelineModule constructor and the choice of module class (see here).
The pipeline section already defines stages, partition and seed_layers in get_pipeline_config (See here), but nothing reads them.
Tensor parallelism and expert parallelism are both driven from the config, through tensor_parallel.autotp_size and expert_parallel.autoep_size.
Describe the solution you'd like
Make the existing pipeline section the place to configure pipeline parallelism.
{
"pipeline": {
"stages": 4,
"partition": "parameters",
"schedule": "dualpipev",
"activation_checkpoint_interval": 0
}
}
stages: the number of pipeline stages.partition: the partition method.schedule:1f1bordualpipev.deepspeed.initialize()selects the engine from this key. Today it selects by module class.
Existing code keeps working. Values passed to the PipelineModule constructor stay valid when the config does not set them.
Additional context
Open questions for discussion.
PipelineModulepartitions its layers in__init__(see here), beforedeepspeed.initialize()reads the config. Should partitioning move toinitialize(), or should the module be re-partitioned there?- Which value wins when the constructor and the config disagree?
I am happy to work on this.
cc: @delock
- Dominant language
- Python
- Stars
- 43.3k
- Forks
- 5.1k
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 66
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from deepspeedai/DeepSpeed
-
[BUG] Universal checkpoint resume puts CPU `step` into fused/capturable optimizer statePossibly taken @ArjunPakhan claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
deepspeedai/DeepSpeed#8884 · 1 comment ·
Maintainers usually reply within 3 days
-
init_inference rejects dtype=torch.int8 on every acceleratorMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
deepspeedai/DeepSpeed#8577 ·
Maintainers usually reply within 3 days
-
[BUG] AutoTP checkpoint load raises AttributeError on a model containing nn.InstanceNorm1dPossibly taken @vineethsaivs claimed this 41 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
deepspeedai/DeepSpeed#8514 ·
Maintainers usually reply within 3 days
-
[BUG] Python checkpoint writers fail to reload full ZeRO-3 state with default torch.loadPossibly taken @ai-yang claimed this 43 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
deepspeedai/DeepSpeed#8500 ·
Maintainers usually reply within 3 days
-
[BUG] set_norm_for_param_grad_in_gpu's grad_accum fallback is dead in both accumulation modesPossibly taken @LOGO127 claimed this 52 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
deepspeedai/DeepSpeed#8371 ·
Maintainers usually reply within 3 days
All issues in deepspeedai/DeepSpeed
Similar issues
-
link-rot
Difficulty 1/5 Under an hour Newbie friendliness 67/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
developmentseed/titiler-cmr#265 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Insecure Brotli version <1.2.1Possibly taken @jamescw19 claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
stac-utils/stac-fastapi-pgstac#438 · 1 reaction ·
-
bug triage
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day