deepspeedai / deepspeedai/DeepSpeed
[feature request] unable to override `dist.init_process_group` timeout in under `zero.Init`
@tohtana is already working on this.
Since Aug 8, 2023.
- Dominant language
- Python
- Stars
- 43.1k
- Forks
- 5k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 112
Description
When zero.Init is used how can a user override the timeout dist init arg? as the dist is inited here:
Of course the user could do something like this before instantiating the model:
from datetime import timedelta
import torch
[...]
if not torch.distributed.is_initialized():
torch.distributed.init_process_group(backend="nccl", timeout=timedelta(seconds=3*60*60)))
but I'm not sure this would even work with deepspeed now using its own comms module and the init calls is much more complex - how would they know to provide the right args?
but perhaps the other alternative is to give users an API to override the default default_pg_timeout, so then they could just do:
form deepspeed import something
something.set_default_pg_timeout(3*60*60)
model = AutoModel.from_pretrained(...) # which internally calls `zero.Init` in transformers
for context: we are dealing with a silent crash in GPU followed by a timeout, so in order to be able to catch this event in action we were trying to extend the timeout to something much longer and run into this issue. Going to try the workaround I proposed at the top of this post.
@tjruwase
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.
Assessment
This issue has not been assessed yet.