grpo训练时报错 node types
set -x
python3 -m verl.trainer.main_ppo
algorithm.adv_estimator=grpo
data.train_files=/mnt/cpfs-data/dongsujun/data/seek_NL2SQL/NL2SQL_v2_train_data_ins_short_20250521.parquet
data.val_files=/mnt/cpfs-data/dongsujun/data/seek_NL2SQL/NL2SQL_v2_train_data_ins_short_20250521_test.parquet
data.train_batch_size=1024
data.max_prompt_length=1024
data.max_response_length=512
data.filter_overlong_prompts=True
data.truncation='error'
actor_rollout_ref.model.path=/mnt/cpfs-data/dongsujun/models/Qwen3-4B
actor_rollout_ref.actor.optim.lr=1e-6
actor_rollout_ref.model.use_remove_padding=True
actor_rollout_ref.actor.ppo_mini_batch_size=256
actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=32
actor_rollout_ref.actor.use_kl_loss=True
actor_rollout_ref.actor.kl_loss_coef=0.001
actor_rollout_ref.actor.kl_loss_type=low_var_kl
actor_rollout_ref.actor.entropy_coeff=0
actor_rollout_ref.model.enable_gradient_checkpointing=True
actor_rollout_ref.actor.fsdp_config.param_offload=False
actor_rollout_ref.actor.fsdp_config.optimizer_offload=False
actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=32
actor_rollout_ref.rollout.tensor_model_parallel_size=2
actor_rollout_ref.rollout.name=vllm
actor_rollout_ref.rollout.gpu_memory_utilization=0.6
actor_rollout_ref.rollout.n=5
actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=32
actor_rollout_ref.ref.fsdp_config.param_offload=True
algorithm.use_kl_in_reward=False
trainer.critic_warmup=0
trainer.logger=['console','wandb']
trainer.project_name='verl_grpo_nl2sql'
trainer.experiment_name='qwen3_4b_nl2sql_rm'
trainer.n_gpus_per_node=8
trainer.nnodes=1
trainer.save_freq=20
trainer.total_epochs=6 $@
报错信息:Error: No available node types can fulfill resource request defaultdict(<class 'float'>, {'GPU': 8.0, 'CPU': 8.0}). Add suitable node types to this cluster to resolve this issue.
i have same error, do you had solved it?
Hi, @sjdongai and @rucieryi369, it’s likely that your machine’s CPU or GPU resources are not configured correctly.
Here are a few suggestions you could try:
- If you're using cluster manager like slurm, try to set like
ray_init.num_cpus=64(or an appropriate value). - Check if
nvidia-smicorrectly shows your GPU info.
In my case, I encountered the following error:
(autoscaler +1m6s) Error: No available node types can fulfill resource request defaultdict(<class 'float'>, {'CPU': 80.0, 'GPU': 8.0}). Add suitable node types to this cluster to resolve this issue.
This happened because my node only has 64 CPU cores, but the task was requesting 10 CPUs per GPU, totaling 80 CPUs. After reducing the number of GPUs to 6, everything worked fine.
Hope this helps!
I met with problem in SLURM, with ray_init.num_cpus=64 it solved.
In RayResourcePool, there is a max_colocate_count param which controls the max num of CPUs allocated for a GPU, which is 10 by default:
If your node has 64 cores, it will require you to use 8*10 CPUs by default; the solution is that you can set it like this:
from verl.single_controller.ray import RayResourcePool
resource_pool = RayResourcePool(process_on_nodes=[config.trainer.n_gpus_per_node] * config.trainer.nnodes,
max_colocate_count=config.ray_init.num_cpus/config.trainer.n_gpus_per_node)
set max_colocate_count = 1 which was set 3 in fault