simulator.num_nodes=4 still builds a 48-node data planeNVIDIA-NeMo/RL #4914. All permalinks pin the PR head daee7636.
cluster.num_nodes=…, and every value computed from it follows.simulator.num_nodes, which overwrites cluster.num_nodes after the config's ${…} values are already filled in.Two pages on this PR — this one: the config-loading bug.
Recipes compute some values from the node count. The base recipe sets
num_storage_units: ${mul:2, ${cluster.num_nodes}}:
two data-plane storage units per node.
_load_config
fills in every ${…} first (to_container(resolve=True)).
Only after that does
apply_simulator_overrides
write the simulator's node count, and nothing computes the derived values again.
The same happens to every other key derived from the node count, such as Gym's
num_processes: ${mul:64, ${cluster.num_nodes}}.
The PR's smoke test and its usage example use 1-node recipes with num_nodes=1, so neither shows the problem.
Where the fix lands: RL only.
entrypoint_utils._load_config sets the node count before resolving, and
apply_simulator_overrides drops its node-count branch.
num_steps can stay where it is: no shipped recipe computes anything from max_num_steps.
Load the config, before
# driver process, once at startup sim = _load_simulator_config(...) # simulator.num_nodes = 4 config = load_config(recipe) + CLI overrides raw = to_container(config, resolve=True) # every ${…} filled in: storage units = 2×48 apply_simulator_overrides(raw, sim) # cluster.num_nodes = 4, storage units still 96
Load the config, after (proposed)
# driver process, once at startup config = load_config(recipe) + CLI overrides sim = _load_simulator_config(...) # unchanged if sim.num_nodes: OmegaConf.update(config, "cluster.num_nodes", sim.num_nodes) OmegaConf.update(config, "…colocated.resources.num_nodes", sim.num_nodes) # vLLM nodes, non-colocated only raw = to_container(config, resolve=True) # storage units = 2×4 = 8 apply_simulator_overrides(raw, sim) # steps, validation, load_format; no node count
Plus a unit test: a recipe key x: ${cluster.num_nodes} with simulator.num_nodes=4 must give x == 4.
🔴 review comment C33 — entrypoint_utils.py:140
cluster.num_nodes directly on the command line avoids the problem until the order is fixed.