0.5的 async training 无法使用
文档中的例子接口在代码里面不存在或者不一致,我尝试自己修改遇到了各种奇怪的bug,官方可以更新下文档或者有人成功复现过吗,可以发一下脚本
感谢感谢
麻烦贴一下运行脚本和报错信息
麻烦贴一下运行脚本和报错信息 我是参照https://verl.readthedocs.io/en/latest/advance/one_step_off.html#configuration-guidelines 里面的配置,但是代码中没有async_main_ppo.py,于是我改成了main_ppo.py, 不知道这样做对不对。 但是修改后的报错很奇怪,应该是不能这样用?
python3 -m recipe.one_step_off_policy.async_main_ppo \
--config-path=config \
--config-name='one_step_off_ppo_megatron_trainer.yaml' \
actor_rollout_ref.actor.strategy=megatron \
# actor and rollout are placed separately
actor_rollout_ref.hybrid_engine=False \
# actor and rollout resource
trainer.nnodes=1 \
trainer.n_gpus_per_node=6 \
rollout.nnodes=1 \
rollout.n_gpus_per_node=2
改成了:
python3 -m recipe.one_step_off_policy.main_ppo \
--config-path=config \
--config-name='one_step_off_ppo_megatron_trainer.yaml' \
actor_rollout_ref.actor.strategy=megatron \
# actor and rollout are placed separately
actor_rollout_ref.hybrid_engine=False \
# actor and rollout resource
trainer.nnodes=1 \
trainer.n_gpus_per_node=6 \
rollout.nnodes=1 \
rollout.n_gpus_per_node=2
I aslo have some problems when lauching the one step async training. My cmd and console output are as follows. It seems that the NCCL comm group has not completed initilization when the first sync_rollout_weight() is called in trainer.init_workers()? Could you plz kindly take a look? @wuxibin89
CUDA_VISIBLE_DEVICES=0,1 python3 -m recipe.one_step_off_policy.main_ppo \
--config-path=config \
--config-name='one_step_off_ppo_trainer.yaml' \
data.train_files=./data/gsm8k/train.parquet \
data.val_files=./data/gsm8k/train.parquet \
data.max_prompt_length=512 \
data.max_response_length=1024 \
actor_rollout_ref.model.path=Qwen/Qwen2.5-0.5B-Instruct \
actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2 \
actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=2 \
actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=2 \
actor_rollout_ref.rollout.tensor_model_parallel_size=1 \
critic.strategy=fsdp2 \
critic.model.path=Qwen/Qwen2.5-0.5B-Instruct \
critic.ppo_micro_batch_size_per_gpu=2 \
actor_rollout_ref.rollout.name=vllm \
actor_rollout_ref.actor.strategy=fsdp2 \
actor_rollout_ref.hybrid_engine=False \
trainer.nnodes=1 \
trainer.n_gpus_per_node=1 \
rollout.nnodes=1 \
rollout.n_gpus_per_node=1
Traceback (most recent call last):
File "/home/xxx/.conda/envs/xxx/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/xxx/.conda/envs/xxx/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/data/cpfs_0/xxx/verl/recipe/one_step_off_policy/main_ppo.py", line 232, in <module>
main()
File "/home/xxx/.conda/envs/xxx/lib/python3.10/site-packages/hydra/main.py", line 94, in decorated_main
_run_hydra(
...
...
File "/data/cpfs_0/xxx/verl/recipe/one_step_off_policy/main_ppo.py", line 226, in run
trainer.init_workers()
File "/data/cpfs_0/xxx/verl/recipe/one_step_off_policy/ray_trainer.py", line 287, in init_workers
self.sync_rollout_weights()
File "/data/cpfs_0/xxx/verl/recipe/one_step_off_policy/ray_trainer.py", line 303, in sync_rollout_weights
ray.get(self.rollout_wg.sync_rollout_weights())
ray.exceptions.RayTaskError(NcclError): ray::WorkerDict.rollout_sync_rollout_weights() (pid=65745, ip=33.51.136.79, actor_id=34c0bb63fee208f511a68e4501000000, repr=<verl.single_controller.ray.base.WorkerDict object at 0x7f1acf3d2170>)
File "/data/cpfs_0/xxx/verl/verl/single_controller/ray/base.py", line 701, in func
return getattr(self.worker_dict[key], name)(*args, **kwargs)
File "/data/cpfs_0/xxx/verl/verl/single_controller/base/decorator.py", line 430, in inner
return func(*args, **kwargs)
File "/data/cpfs_0/xxx/verl/recipe/one_step_off_policy/fsdp_workers.py", line 89, in sync_rollout_weights
collective.broadcast(tensor, src_rank=0, group_name="actor_rollout")
File "/home/xxx/.conda/envs/xxx/lib/python3.10/site-packages/ray/util/collective/collective.py", line 429, in broadcast
g.broadcast([tensor], opts)
File "/home/xxx/.conda/envs/xxx/lib/python3.10/site-packages/ray/util/collective/collective_group/nccl_collective_group.py", line 269, in broadcast
self._collective(tensors, tensors, collective_fn)
File "/home/xxx/.conda/envs/xxx/lib/python3.10/site-packages/ray/util/collective/collective_group/nccl_collective_group.py", line 604, in _collective
comms = self._get_nccl_collective_communicator(key, devices)
File "/home/xxx/.conda/envs/xxx/lib/python3.10/site-packages/ray/util/collective/collective_group/nccl_collective_group.py", line 451, in _get_nccl_collective_communicator
nccl_util.groupEnd()
File "cupy_backends/cuda/libs/nccl.pyx", line 210, in cupy_backends.cuda.libs.nccl.groupEnd
File "cupy_backends/cuda/libs/nccl.pyx", line 243, in cupy_backends.cuda.libs.nccl.groupEnd
File "cupy_backends/cuda/libs/nccl.pyx", line 129, in cupy_backends.cuda.libs.nccl.check_status
cupy_backends.cuda.libs.nccl.NcclError: NCCL_ERROR_UNHANDLED_CUDA_ERROR: unhandled cuda error (run with NCCL_DEBUG=INFO for details)
I aslo have some problems when lauching the one step async training. My cmd and console output are as follows. It seems that the NCCL comm group has not completed initilization when the first sync_rollout_weight() is called in trainer.init_workers()? Could you plz kindly take a look? @wuxibin89
CUDA_VISIBLE_DEVICES=0,1 python3 -m recipe.one_step_off_policy.main_ppo \ --config-path=config \ --config-name='one_step_off_ppo_trainer.yaml' \ data.train_files=./data/gsm8k/train.parquet \ data.val_files=./data/gsm8k/train.parquet \ data.max_prompt_length=512 \ data.max_response_length=1024 \ actor_rollout_ref.model.path=Qwen/Qwen2.5-0.5B-Instruct \ actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2 \ actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=2 \ actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=2 \ actor_rollout_ref.rollout.tensor_model_parallel_size=1 \ critic.strategy=fsdp2 \ critic.model.path=Qwen/Qwen2.5-0.5B-Instruct \ critic.ppo_micro_batch_size_per_gpu=2 \ actor_rollout_ref.rollout.name=vllm \ actor_rollout_ref.actor.strategy=fsdp2 \ actor_rollout_ref.hybrid_engine=False \ trainer.nnodes=1 \ trainer.n_gpus_per_node=1 \ rollout.nnodes=1 \ rollout.n_gpus_per_node=1Traceback (most recent call last): File "/home/xxx/.conda/envs/xxx/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/home/xxx/.conda/envs/xxx/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/data/cpfs_0/xxx/verl/recipe/one_step_off_policy/main_ppo.py", line 232, in <module> main() File "/home/xxx/.conda/envs/xxx/lib/python3.10/site-packages/hydra/main.py", line 94, in decorated_main _run_hydra( ... ... File "/data/cpfs_0/xxx/verl/recipe/one_step_off_policy/main_ppo.py", line 226, in run trainer.init_workers() File "/data/cpfs_0/xxx/verl/recipe/one_step_off_policy/ray_trainer.py", line 287, in init_workers self.sync_rollout_weights() File "/data/cpfs_0/xxx/verl/recipe/one_step_off_policy/ray_trainer.py", line 303, in sync_rollout_weights ray.get(self.rollout_wg.sync_rollout_weights()) ray.exceptions.RayTaskError(NcclError): ray::WorkerDict.rollout_sync_rollout_weights() (pid=65745, ip=33.51.136.79, actor_id=34c0bb63fee208f511a68e4501000000, repr=<verl.single_controller.ray.base.WorkerDict object at 0x7f1acf3d2170>) File "/data/cpfs_0/xxx/verl/verl/single_controller/ray/base.py", line 701, in func return getattr(self.worker_dict[key], name)(*args, **kwargs) File "/data/cpfs_0/xxx/verl/verl/single_controller/base/decorator.py", line 430, in inner return func(*args, **kwargs) File "/data/cpfs_0/xxx/verl/recipe/one_step_off_policy/fsdp_workers.py", line 89, in sync_rollout_weights collective.broadcast(tensor, src_rank=0, group_name="actor_rollout") File "/home/xxx/.conda/envs/xxx/lib/python3.10/site-packages/ray/util/collective/collective.py", line 429, in broadcast g.broadcast([tensor], opts) File "/home/xxx/.conda/envs/xxx/lib/python3.10/site-packages/ray/util/collective/collective_group/nccl_collective_group.py", line 269, in broadcast self._collective(tensors, tensors, collective_fn) File "/home/xxx/.conda/envs/xxx/lib/python3.10/site-packages/ray/util/collective/collective_group/nccl_collective_group.py", line 604, in _collective comms = self._get_nccl_collective_communicator(key, devices) File "/home/xxx/.conda/envs/xxx/lib/python3.10/site-packages/ray/util/collective/collective_group/nccl_collective_group.py", line 451, in _get_nccl_collective_communicator nccl_util.groupEnd() File "cupy_backends/cuda/libs/nccl.pyx", line 210, in cupy_backends.cuda.libs.nccl.groupEnd File "cupy_backends/cuda/libs/nccl.pyx", line 243, in cupy_backends.cuda.libs.nccl.groupEnd File "cupy_backends/cuda/libs/nccl.pyx", line 129, in cupy_backends.cuda.libs.nccl.check_status cupy_backends.cuda.libs.nccl.NcclError: NCCL_ERROR_UNHANDLED_CUDA_ERROR: unhandled cuda error (run with NCCL_DEBUG=INFO for details)
I met too, do you have solved it?
I aslo have some problems when lauching the one step async training. My cmd and console output are as follows. It seems that the NCCL comm group has not completed initilization when the first sync_rollout_weight() is called in trainer.init_workers()? Could you plz kindly take a look? @wuxibin89
CUDA_VISIBLE_DEVICES=0,1 python3 -m recipe.one_step_off_policy.main_ppo \ --config-path=config \ --config-name='one_step_off_ppo_trainer.yaml' \ data.train_files=./data/gsm8k/train.parquet \ data.val_files=./data/gsm8k/train.parquet \ data.max_prompt_length=512 \ data.max_response_length=1024 \ actor_rollout_ref.model.path=Qwen/Qwen2.5-0.5B-Instruct \ actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2 \ actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=2 \ actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=2 \ actor_rollout_ref.rollout.tensor_model_parallel_size=1 \ critic.strategy=fsdp2 \ critic.model.path=Qwen/Qwen2.5-0.5B-Instruct \ critic.ppo_micro_batch_size_per_gpu=2 \ actor_rollout_ref.rollout.name=vllm \ actor_rollout_ref.actor.strategy=fsdp2 \ actor_rollout_ref.hybrid_engine=False \ trainer.nnodes=1 \ trainer.n_gpus_per_node=1 \ rollout.nnodes=1 \ rollout.n_gpus_per_node=1Traceback (most recent call last): File "/home/xxx/.conda/envs/xxx/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/home/xxx/.conda/envs/xxx/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/data/cpfs_0/xxx/verl/recipe/one_step_off_policy/main_ppo.py", line 232, in <module> main() File "/home/xxx/.conda/envs/xxx/lib/python3.10/site-packages/hydra/main.py", line 94, in decorated_main _run_hydra( ... ... File "/data/cpfs_0/xxx/verl/recipe/one_step_off_policy/main_ppo.py", line 226, in run trainer.init_workers() File "/data/cpfs_0/xxx/verl/recipe/one_step_off_policy/ray_trainer.py", line 287, in init_workers self.sync_rollout_weights() File "/data/cpfs_0/xxx/verl/recipe/one_step_off_policy/ray_trainer.py", line 303, in sync_rollout_weights ray.get(self.rollout_wg.sync_rollout_weights()) ray.exceptions.RayTaskError(NcclError): ray::WorkerDict.rollout_sync_rollout_weights() (pid=65745, ip=33.51.136.79, actor_id=34c0bb63fee208f511a68e4501000000, repr=<verl.single_controller.ray.base.WorkerDict object at 0x7f1acf3d2170>) File "/data/cpfs_0/xxx/verl/verl/single_controller/ray/base.py", line 701, in func return getattr(self.worker_dict[key], name)(*args, **kwargs) File "/data/cpfs_0/xxx/verl/verl/single_controller/base/decorator.py", line 430, in inner return func(*args, **kwargs) File "/data/cpfs_0/xxx/verl/recipe/one_step_off_policy/fsdp_workers.py", line 89, in sync_rollout_weights collective.broadcast(tensor, src_rank=0, group_name="actor_rollout") File "/home/xxx/.conda/envs/xxx/lib/python3.10/site-packages/ray/util/collective/collective.py", line 429, in broadcast g.broadcast([tensor], opts) File "/home/xxx/.conda/envs/xxx/lib/python3.10/site-packages/ray/util/collective/collective_group/nccl_collective_group.py", line 269, in broadcast self._collective(tensors, tensors, collective_fn) File "/home/xxx/.conda/envs/xxx/lib/python3.10/site-packages/ray/util/collective/collective_group/nccl_collective_group.py", line 604, in _collective comms = self._get_nccl_collective_communicator(key, devices) File "/home/xxx/.conda/envs/xxx/lib/python3.10/site-packages/ray/util/collective/collective_group/nccl_collective_group.py", line 451, in _get_nccl_collective_communicator nccl_util.groupEnd() File "cupy_backends/cuda/libs/nccl.pyx", line 210, in cupy_backends.cuda.libs.nccl.groupEnd File "cupy_backends/cuda/libs/nccl.pyx", line 243, in cupy_backends.cuda.libs.nccl.groupEnd File "cupy_backends/cuda/libs/nccl.pyx", line 129, in cupy_backends.cuda.libs.nccl.check_status cupy_backends.cuda.libs.nccl.NcclError: NCCL_ERROR_UNHANDLED_CUDA_ERROR: unhandled cuda error (run with NCCL_DEBUG=INFO for details)I met too, do you have solved it?
not yet, still debugging lol
Same problems, do you have solved it?
same problem
mark一下,等大佬的解决办法
maybe try
unset NCCL_IB_HCA
unset NCCL_SOCKET_IFNAME
unset NCCL_IB_DISABLE
export NCCL_DEBUG=INFO
export NCCL_IB_DISABLE=1
export NCCL_P2P_DISABLE=1
trainer.nnodes=1 \
trainer.n_gpus_per_node=1 \
rollout.nnodes=1 \
rollout.n_gpus_per_node=1
@qq1243196045 你的ray总资源是2卡吗? 如果ray的资源和申请使用的资源不一致,可以会遇到问题
定时清理检查结论:按社区 issue 定时处理规则关闭此 issue。
证据:最近一次非当前运行账号的公开回复或引用是 2025-10-17T12:47:33Z(actor: qq1243196045, kind: mentioned),早于本轮 6 个月阈值 2026-01-13T01:10:17.218155+00:00。 检查来源:https://github.com/verl-project/verl/issues/2886,comments API https://api.github.com/repos/verl-project/verl/issues/2886/comments,timeline API https://api.github.com/repos/verl-project/verl/issues/2886/timeline。
如果作者或社区成员仍能提供新的复现、证据或需求背景,请在这里重新评论请求维护者重开,或创建新的 issue 并链接到本 issue。
Scheduled cleanup conclusion: this issue is being closed under the community issue processing policy.
Evidence: The latest public reply or reference from an account other than the current automation account was 2025-10-17T12:47:33Z (actor: qq1243196045, kind: mentioned), which is older than the six-month threshold for this run (2026-01-13T01:10:17.218155+00:00). Sources checked: https://github.com/verl-project/verl/issues/2886, comments API https://api.github.com/repos/verl-project/verl/issues/2886/comments, timeline API https://api.github.com/repos/verl-project/verl/issues/2886/timeline.
If the author or community can still provide a fresh reproduction, evidence, or requirement context, please comment here to ask maintainers to reopen it, or open a new issue and link back to this one.
This response was generated by a scheduled Codex GPT5.5 issue processing task.