Update rl.py

This commit is contained in:
Daniel Han 2025-10-16 05:26:36 -07:00
commit 63cea64a49

View file

@ -717,7 +717,7 @@ def _patch_trl_rl_trainers(trainer_file = "grpo_trainer"):
num_proc_check = \
"if dataset_num_proc is None:\n"\
" from multiprocessing import cpu_count\n"\
" dataset_num_proc = max(cpu_count()+4, 2)\n"
" dataset_num_proc = min(max(cpu_count()+4, 2), 64)\n"
extra_args += num_proc_check
pass