Multi-gpu prompt tuning hanging when running in kube cluster
- Dominant language
- Python
- Stars
- 12
- Forks
- 55
- PR merge metrics
- No merged PRs in 30d
Description
### Description
We are using torch distributed elastic launch method to kick off training on multi-gpu single node environment. It seems to be working fine when running locally, i.e in a machine that has multi-gpu available, it also works fine on single GPU but it hangs when we provide `WORLD_SIZE`, `MASTER_ADDR`, `MASTER_PORT` parameters. There seems to be some issue with the master address/port configuration where its trying to connect with the GPU but keeps waiting.
Run command:
```
ALLOW_DOWNLOADS=true WORLD_SIZE=2 RANK=0 MASTER_ADDR=localhost MASTER_PORT=25590 python3 run_peft_tuning.py PROMPT_TUNING --dataset "glue/rte" --model_name google/flan-t5-xl --num_epochs 1 --verbose --prompt_tuning_init TEXT --output_dir prompt_prefixes/flan_t5_xl_1_epoch_rte_16_batch_1_acc_hf_trainer --learning_rate 0.3 --batch_size=16 --accumulate_steps 1 --max_target_length 512 --max_source_length 2048 --torch_dtype bfloat16
```
Relevant code to launch the training:
- Launch config generation: https://github.com/gkumbhat/caikit-nlp/blob/add_pt_hf_trainer/caikit_nlp/toolkit/torch_run.py#L66
- Invoking elastic launch: https://github.com/gkumbhat/caikit-nlp/blob/add_pt_hf_trainer/caikit_nlp/modules/text_generation/peft_prompt_tuning.py#L515
Contributor guide
Research direction
Start with caikit_nlp/toolkit/torch_run.py around line 66 and caikit_nlp/modules/text_generation/peft_prompt_tuning.py around line 515, then reproduce the provided command with WORLD_SIZE, RANK, MASTER_ADDR, and MASTER_PORT in the kube cluster. Compare the launch configuration with the local multi-GPU and single-GPU behavior. Done means multi-GPU prompt tuning starts without hanging in the cluster.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes, python, pytorch
- Domain
- distributed-systems, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100