verl icon indicating copy to clipboard operation
verl copied to clipboard

Randomly stuck during training and then back up after hours

Open brick-pid opened this issue 1 year ago • 5 comments

I'm training a search agent, which will do a multi-turn tool-integrated rollout and I'm seeing that the model randomly gets stuck during training, but after a few hours, it resumes. I would like to know what the possible cause is? Or how do I debug?

I thought there was a problem with the rollout process, but after setting the timeout in the generate_sequences() in vLLMRolloutWithTool, I found that I still encountered random freezes during training (although I recovered myself after two hours).

And I've noticed that in the process of getting stuck, it still takes up video memory, and it seems to be stuck in an endless loop when calculating something. I wonder how debugging should be done? I don't really understand how debugging is distributed in verl (I am using one node with 8 gpu). Any suggestions would be appreciated.

Image

brick-pid avatar May 26 '25 09:05 brick-pid

It seems to be in WorkerDict.actor_rollout_update_actor this task is stuck.

(verl) root@dsw-250747-689b97f59f-jcblq:/mnt/workspace/linjianbo/verl# ray summary tasks

======== Tasks Summary: 2025-05-27 17:53:46.464869 ========
Stats:
------------------------------------
total_actor_scheduled: 10
total_actor_tasks: 3490
total_tasks: 1


Table (group by func_name):
------------------------------------
    FUNC_OR_CLASS_NAME                            STATE_COUNTS    TYPE
0   WorkerDict.critic_compute_values              FINISHED: 672   ACTOR_TASK
1   WorkerDict.actor_rollout_compute_log_prob     FINISHED: 672   ACTOR_TASK
2   WorkerDict.actor_rollout_generate_sequences   FINISHED: 696   ACTOR_TASK
3   WorkerDict.actor_rollout_update_actor         FINISHED: 664   ACTOR_TASK
                                                  RUNNING: 8
4   WorkerDict.critic_update_critic               FINISHED: 672   ACTOR_TASK
5   WorkerGroupRegisterCenter.set_worker_info     FINISHED: 8     ACTOR_TASK
6   WorkerDict.critic_load_checkpoint             FINISHED: 8     ACTOR_TASK
7   WorkerDict.actor_rollout_save_checkpoint      FINISHED: 32    ACTOR_TASK
8   WorkerGroupRegisterCenter.get_rank_zero_info  FINISHED: 1     ACTOR_TASK
9   WorkerDict.critic_save_checkpoint             FINISHED: 32    ACTOR_TASK
10  TaskRunner.run                                RUNNING: 1      ACTOR_TASK
11  WorkerDict.actor_rollout_init_model           FINISHED: 8     ACTOR_TASK
12  WorkerDict.actor_rollout_load_checkpoint      FINISHED: 8     ACTOR_TASK
13  WorkerDict.critic_init_model                  FINISHED: 8     ACTOR_TASK
14  bundle_reservation_check_func                 FINISHED: 1     NORMAL_TASK
15  WorkerDict.__init__                           FINISHED: 8     ACTOR_CREATION_TASK
16  TaskRunner.__init__                           FINISHED: 1     ACTOR_CREATION_TASK
17  WorkerGroupRegisterCenter.__init__            FINISHED: 1     ACTOR_CREATION_TASK

brick-pid avatar May 27 '25 09:05 brick-pid

It seems to be in WorkerDict.actor_rollout_update_actor this task is stuck.

(verl) root@dsw-250747-689b97f59f-jcblq:/mnt/workspace/linjianbo/verl# ray summary tasks

======== Tasks Summary: 2025-05-27 17:53:46.464869 ========
Stats:
------------------------------------
total_actor_scheduled: 10
total_actor_tasks: 3490
total_tasks: 1


Table (group by func_name):
------------------------------------
    FUNC_OR_CLASS_NAME                            STATE_COUNTS    TYPE
0   WorkerDict.critic_compute_values              FINISHED: 672   ACTOR_TASK
1   WorkerDict.actor_rollout_compute_log_prob     FINISHED: 672   ACTOR_TASK
2   WorkerDict.actor_rollout_generate_sequences   FINISHED: 696   ACTOR_TASK
3   WorkerDict.actor_rollout_update_actor         FINISHED: 664   ACTOR_TASK
                                                  RUNNING: 8
4   WorkerDict.critic_update_critic               FINISHED: 672   ACTOR_TASK
5   WorkerGroupRegisterCenter.set_worker_info     FINISHED: 8     ACTOR_TASK
6   WorkerDict.critic_load_checkpoint             FINISHED: 8     ACTOR_TASK
7   WorkerDict.actor_rollout_save_checkpoint      FINISHED: 32    ACTOR_TASK
8   WorkerGroupRegisterCenter.get_rank_zero_info  FINISHED: 1     ACTOR_TASK
9   WorkerDict.critic_save_checkpoint             FINISHED: 32    ACTOR_TASK
10  TaskRunner.run                                RUNNING: 1      ACTOR_TASK
11  WorkerDict.actor_rollout_init_model           FINISHED: 8     ACTOR_TASK
12  WorkerDict.actor_rollout_load_checkpoint      FINISHED: 8     ACTOR_TASK
13  WorkerDict.critic_init_model                  FINISHED: 8     ACTOR_TASK
14  bundle_reservation_check_func                 FINISHED: 1     NORMAL_TASK
15  WorkerDict.__init__                           FINISHED: 8     ACTOR_CREATION_TASK
16  TaskRunner.__init__                           FINISHED: 1     ACTOR_CREATION_TASK
17  WorkerGroupRegisterCenter.__init__            FINISHED: 1     ACTOR_CREATION_TASK

How did you solve it ?

yuleiqin avatar May 29 '25 08:05 yuleiqin

I'm training a search agent, which will do a multi-turn tool-integrated rollout and I'm seeing that the model randomly gets stuck during training, but after a few hours, it resumes. I would like to know what the possible cause is? Or how do I debug?

I thought there was a problem with the rollout process, but after setting the timeout in the generate_sequences() in vLLMRolloutWithTool, I found that I still encountered random freezes during training (although I recovered myself after two hours).

And I've noticed that in the process of getting stuck, it still takes up video memory, and it seems to be stuck in an endless loop when calculating something. I wonder how debugging should be done? I don't really understand how debugging is distributed in verl (I am using one node with 8 gpu). Any suggestions would be appreciated.

Image

Same issue with you. It makes the training time unacceptably long. How did you solve it?

lzp2001 avatar Jun 04 '25 05:06 lzp2001

I noticed this happens during validation. I set trainer.test_freq to a large number and don't see these freezes anymore.

HareshKarnan avatar Jul 03 '25 17:07 HareshKarnan

@brick-pid How did you solve this issue ?

anonymous-atom avatar Sep 09 '25 08:09 anonymous-atom