OpenRLHF: NCCL Broad cast error after first actor fit
Hi team when doing the training across 2 nodes encounter this NCCL broadcast error after actor model fits and tries to broadcast its weights to VLLM , the setup uses docker with host network with latest code and packages
error log
File "/tmp/ray/session_2024-04-16_10-06-58_358542_87462/runtime_resources/working_dir_files/_ray_pkg_ab7da7b94bfeca0d/openrlhf/trainer/ray/ppo_actor.py", line 327, in fit
trainer.fit(self.prompts_dataloader, self.pretrain_dataloader, args)
File "/tmp/ray/session_2024-04-16_10-06-58_358542_87462/runtime_resources/working_dir_files/_ray_pkg_ab7da7b94bfeca0d/openrlhf/trainer/ppo_trainer.py", line 186, in fit
status = self.ppo_train()
^^^^^^^^^^^^^^^^
File "/tmp/ray/session_2024-04-16_10-06-58_358542_87462/runtime_resources/working_dir_files/_ray_pkg_ab7da7b94bfeca0d/openrlhf/trainer/ray/ppo_actor.py", line 111, in ppo_train
self._broadcast_to_vllm()
File "/tmp/ray/session_2024-04-16_10-06-58_358542_87462/runtime_resources/working_dir_files/_ray_pkg_ab7da7b94bfeca0d/openrlhf/trainer/ray/ppo_actor.py", line 145, in _broadcast_to_vllm
torch.distributed.broadcast(param.data, 0, group=self._model_update_group)
File "/root/miniconda3/envs/open/lib/python3.11/site-packages/torch/distributed/c10d_logger.py", line 47, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/open/lib/python3.11/site-packages/torch/distributed/distributed_c10d.py", line 1910, in broadcast
work = group.broadcast([tensor], opts)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
torch.distributed.DistBackendError: NCCL error in: ../torch/csrc/distributed/c10d/ProcessGroupNCCL.cpp:1333, remote process exited or there was a network error, NCCL
version 2.18.1
ncclRemoteError: A call failed possibly due to a network error or a remote process exiting prematurely.
Last error:
socketProgressOpt: Call to recv from 45.63.16.199<59021> failed : Broken pipe
(ActorModelRayActor pid=100404)
Episode [1/1]: 1%| | 127/20000 [3:00:08<469:49:16, 85.11s/it]
---------------------------------------
Job 'raysubmit_Dm8DGdfAsJPvRMJs' failed
---------------------------------------
Status message: Job entrypoint command failed with exit code 1, last available logs (truncated to 20,000 chars):
^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/open/lib/python3.11/site-packages/torch/distributed/distributed_c10d.py", line 1910, in broadcast
work = group.broadcast([tensor], opts)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
torch.distributed.DistBackendError: NCCL error in: ../torch/csrc/distributed/c10d/ProcessGroupNCCL.cpp:1333, remote process exited or there was a network error, NCCL
version 2.18.1
ncclRemoteError: A call failed possibly due to a network error or a remote process exiting prematurely.
Last error:
socketProgressOpt: Call to recv from 45.63.16.199<59021> failed : Broken pipe
(ActorModelRayActor pid=100404)
Episode [1/1]: 1%| | 127/20000 [3:00:08<469:49:16, 85.11s/it]
Run command
set -x
export PATH=$HOME/.local/bin/:$PATH
ray job submit --address="http://127.0.0.1:8265" \
--runtime-env-json='{"working_dir": "/workspace/openrlhf", "pip": "/workspace/openrlhf/requirements.txt"}' \
-- python3 examples/train_ppo_ray.py \
--ref_num_nodes 1 \
--ref_num_gpus_per_node 2 \
--reward_num_nodes 1 \
--reward_num_gpus_per_node 4 \
--critic_num_nodes 1 \
--critic_num_gpus_per_node 4 \
--actor_num_nodes 1 \
--actor_num_gpus_per_node 4 \
--vllm_num_engines 1 \
--vllm_tensor_parallel_size 2 \
--pretrain meta-llama/Llama-2-70b-chat-hf \
--reward_pretrain meta-llama/Llama-2-70b-chat-hf \
--save_path /mnt/bn/wuxibin/cache/ckpt/llama_70b \
--micro_train_batch_size 1 \
--train_batch_size 64 \
--micro_rollout_batch_size 1 \
--rollout_batch_size 512 \
--max_epochs 1 \
--prompt_max_len 1000 \
--generate_max_len 1000 \
--zero_stage 3 \
--bf16 \
--actor_learning_rate 5e-7 \
--critic_learning_rate 9e-6 \
--init_kl_coef 0.01 \
--prompt_data Open-Orca/OpenOrca,Dahoas/full-hh-rlhf,tasksource/oasst1_pairwise_rlhf_reward \
--prompt_data_probs 0.4,0.5,0.1 \
--max_samples 80000 \
--normalize_reward \
--actor_init_on_gpu \
--adam_offload \
--flash_attn \
--gradient_checkpointing
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 18
It think 45.63.16.199 can’t access 144.202.8.219. This is the cause of the problem, I can currently run openrlhf well on two machines + docker + host net.