verl icon indicating copy to clipboard operation
verl copied to clipboard

The code stucks at ray.get(runner.run.remote(config))

Open zlq147 opened this issue 1 year ago • 8 comments

我运行下面的命令,但卡在了一个地方。

cd $my_verl_path

CUDA_VISIBLE_DEVICES=0,1,2,3 torchrun --standalone --nnodes 1 --nproc_per_node 4 -m verl.trainer.main_ppo \
data.train_files=$my_train_data_parquet_path \
data.val_files=$my_val_data_parquet_path \
data.prompt_key=prompt \
data.shuffle=True \
data.reward_fn_key=["data_source","solution_str","ground_truth","extra_info"] \
data.max_prompt_length=8000 \
data.max_response_length=1024 \
data.train_batch_size=4 \
data.val_batch_size=1 \
actor_rollout_ref.hybrid_engine=True \
actor_rollout_ref.model.path=$llama-3.1-8b-instruct_path \
actor_rollout_ref.model.enable_gradient_checkpointing=True \
actor_rollout_ref.model.use_remove_padding=False \
actor_rollout_ref.actor.ppo_mini_batch_size=4 \
actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=1 \
actor_rollout_ref.actor.strategy=fsdp \
actor_rollout_ref.actor.entropy_coeff=0.001 \
actor_rollout_ref.actor.use_kl_loss=True \
actor_rollout_ref.actor.kl_loss_coef=0.001 \
actor_rollout_ref.actor.ppo_epochs=1 \
+actor_rollout_ref.actor.fsdp_config.wrap_policy.transformer_layer_cls_to_wrap=["LlamaDecoderLayer"] \
actor_rollout_ref.actor.fsdp_config.wrap_policy.min_num_params=0 \
actor_rollout_ref.actor.fsdp_config.param_offload=True \
actor_rollout_ref.actor.fsdp_config.optimizer_offload=True \
actor_rollout_ref.actor.fsdp_config.fsdp_size=-1 \
actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=1 \
actor_rollout_ref.rollout.name=vllm \
actor_rollout_ref.rollout.dtype=bfloat16 \
actor_rollout_ref.rollout.gpu_memory_utilization=0.4 \
actor_rollout_ref.rollout.tensor_model_parallel_size=4 \
actor_rollout_ref.rollout.do_sample=True \
actor_rollout_ref.rollout.n=4 \
actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=1 \
reward_model.enable=False \
custom_reward_function.path=$my_reward_path \
custom_reward_function.name=$my_reward_func_name \
algorithm.adv_estimator=grpo \
trainer.project_name=fku \
trainer.experiment_name=fku \
trainer.total_epochs=1 \
trainer.n_gpus_per_node=4 \
trainer.max_actor_ckpt_to_keep=2 \
trainer.logger=console \
trainer.save_freq=100 \
trainer.test_freq=100

然后就卡在了下面这里:

..... (TaskRunner pid=316082) DeprecationWarning: ray.state.available_resources_per_node is a private attribute and access will be removed in a future Ray version. (TaskRunner pid=316482) Size of train dataloader: 512, Size of val dataloader: 50 (TaskRunner pid=316482) Total training steps: 512 (TaskRunner pid=316482) colocated worker base class <class 'verl.single_controller.base.worker.Worker'> (TaskRunner pid=316482) DeprecationWarning: ray.state.available_resources_per_node is a private attribute and access will be removed in a future Ray version. (TaskRunner pid=316458) DeprecationWarning: ray.state.available_resources_per_node is a private attribute and access will be removed in a future Ray version. (TaskRunner pid=316458) Size of train dataloader: 512, Size of val dataloader: 50 (TaskRunner pid=316458) Total training steps: 512 (TaskRunner pid=316458) colocated worker base class <class 'verl.single_controller.base.worker.Worker'> (TaskRunner pid=316082) WARNING:2025-07-23 15:25:22,444:Waiting for register center actor 59NrY4_register_center to be ready. Elapsed time: 0 seconds out of 300 seconds. (TaskRunner pid=316241) WARNING:2025-07-23 15:25:22,443:Waiting for register center actor si4q8I_register_center to be ready. Elapsed time: 0 seconds out of 300 seconds. (TaskRunner pid=316482) WARNING:2025-07-23 15:25:22,498:Waiting for register center actor AkkA7E_register_center to be ready. Elapsed time: 0 seconds out of 300 seconds. (TaskRunner pid=316458) WARNING:2025-07-23 15:25:22,601:Waiting for register center actor wH5nLi_register_center to be ready. Elapsed time: 0 seconds out of 300 seconds.

经过排查,发现卡在main_ppo.py中的ray.get(runner.run.remote(config))这一步。更近一步,runner.run.remote(config)能正常运行,但ray.get()这一步会卡。

我关于verl的环境版本配置如下:

verl:0.4.1.dev0 ray:2.48.0

zlq147 avatar Jul 23 '25 08:07 zlq147

We observed a similar hang, with final log line

colocated worker base class <class 'verl.single_controller.base.worker.Worker'>

DmitriGekhtman avatar Sep 23 '25 23:09 DmitriGekhtman

We observed a similar hang, with final log line

colocated worker base class <class 'verl.single_controller.base.worker.Worker'>

hi, Have you solved this problem?

Swimakkkkkkkk avatar Oct 30 '25 06:10 Swimakkkkkkkk

Unfortunately, we observed the issue exactly once. We didn't get a chance to work on a reproduction.

DmitriGekhtman avatar Oct 30 '25 23:10 DmitriGekhtman

similar problem, could u please share you solution?

2019211753 avatar Dec 08 '25 03:12 2019211753

similar problem, could u please share you solution?

After I increase the system memory for training task, it won't stuck

Swimakkkkkkkk avatar Dec 09 '25 12:12 Swimakkkkkkkk

similar problem, could u please share you solution?

After I increase the system memory for training task, it won't stuck

Hi, how to increase the system memory for the training task?

jiangbojian avatar Dec 17 '25 15:12 jiangbojian

similar problem, could u please share you solution?

After I increase the system memory for training task, it won't stuck

Hi, how to increase the system memory for the training task?

I mean CPU memory, depending on the your machine configuration. I use 2 * 8 H20 , I test 600G is ok, but set 400G will stuck.

Swimakkkkkkkk avatar Dec 22 '25 04:12 Swimakkkkkkkk

中文

定时清理检查发现:此 issue 最近一次非当前运行账号的公开回复或引用时间是 2025-12-22T04:08:53Z(comment,来自 Swimakkkkkkkk),相对于本轮运行日期 2026-07-12 已超过 6 个月。因此按社区 issue 定时清理标准关闭。

已检查证据:Latest non-self public reply/reference: 2025-12-22T04:08:53Z (comment by Swimakkkkkkkk). Comments API: https://api.github.com/repos/verl-project/verl/issues/2705/comments Timeline API: https://api.github.com/repos/verl-project/verl/issues/2705/timeline

如果作者或社区成员仍能提供新的复现、证据或需求背景,请在此 issue 下继续评论请求重开,或创建新的 issue 并链接到这里。

English

Scheduled cleanup check found that the latest public reply or reference by an account other than the current automation account was 2025-12-22T04:08:53Z (comment by Swimakkkkkkkk), which is more than 6 months before this run date 2026-07-12. Therefore this issue is being closed under the scheduled stale-issue cleanup rule.

Evidence checked: Latest non-self public reply/reference: 2025-12-22T04:08:53Z (comment by Swimakkkkkkkk). Comments API: https://api.github.com/repos/verl-project/verl/issues/2705/comments Timeline API: https://api.github.com/repos/verl-project/verl/issues/2705/timeline

If the author or community members can still provide a fresh reproduction, evidence, or requirement context, please comment here to request reopening, or open a new issue and link back to this one.

This response was generated by a scheduled Codex GPT5.5 issue processing task.

Kirrito-k423 avatar Jul 12 '26 01:07 Kirrito-k423