Repository navigation
[trainer, cfg] fix: size TransferQueue storage units from trainer.nnodes - #8340
Open
nataliekung wants to merge 1 commit into
Open
nataliekung wants to merge 1 commit into
nataliekung wants to merge 1 commit into
Conversation
num_data_storage_units defaulted to a fixed 8. Each SimpleStorageUnit and the controller reserve 1 CPU, and the V1 TaskRunner always enables TransferQueue, so every default PPO run reserved 9 CPUs before the trainer started. On a node with fewer than 9 CPUs available to Ray, one unit stays PENDING_CREATION and tq.init blocks with no error. Default the count to null and resolve it to 2 x trainer.nnodes before tq.init, matching the in-config recommendation. An explicit value is kept. Refs: verl-project#7398
nataliekung
requested review from
PeterSH6,
eric-haibin-lin,
tongyx361 and
vermouth1992
as code owners
October 22, 2026 18:51
Contributor
Author
|
@wuxibin89 could you approve the CI workflow runs for this PR and the ones below when you have a moment? They come from an external contributor, so each shows 35-36 workflows waiting for approval, and none of them has run CI yet. All are mergeable against current main.
Thanks. |
Contributor
|
Well, on a node with fewer than 9 CPUs is not even able to perform the training 😂 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes #7398.
transfer_queue.backend.SimpleStorage.num_data_storage_unitsdefaulted to a fixed 8. EachSimpleStorageUnitand theTransferQueueControllerreserve 1 CPU, andTaskRunnerV1.runalways setstransfer_queue.enable = True, so every default PPO run reserves 9 CPUs before the trainer starts. On a node where Ray has fewer than 9 CPUs, one unit staysPENDING_CREATIONandtq.initblocks with no error.This PR defaults the count to
nulland resolves it to2 * trainer.nnodesright beforetq.init, which matches the recommendation in the config comment. An explicit value is kept as is.Checklist Before Starting
[{modules}] {type}: {description}Test
tests/trainer/test_tq_storage_units_on_cpu.pycomposesppo_trainerwith Hydra and checks:nnodes=1gives 2,nnodes=4gives 8, an explicitnum_data_storage_units=3stays 3. Local run: 3 passed.scripts/generate_trainer_config.shregenerated the four_generated_*.yamlfiles and reports clean.PENDING_CREATIONandtq.initblocked for 120 s; 8 CPUs with 2 units returns with 5 CPUs left.API and Usage Example
No new option. Users who relied on 8 units on a 1 to 3 node run can set it explicitly:
Design & Code Changes
verl/trainer/config/transfer_queue/transfer_queue.yaml: defaultnull, comment states the 1 CPU per unit cost.verl/trainer/main_ppo.py:set_default_tq_storage_units(config)fills the count fromtrainer.nnodeswhen it isnull, called before the config is printed and passed totq.init. This is the only place in verl that creates TransferQueue from config; the othertq.init()calls attach to the existing controller._generated_ppo_*.yaml.Checklist Before Submitting