unilab.training.dp_config

Hydra-side data-parallel configuration assembly.

Merged from unilab_rl @ 3654e4b (unilab-rl 1.4.15), Apache-2.0; previously uni_rl.ipc.dp_launcher (and duplicated in unilab.rl.distributed). This module owns the per-rank Hydra config rewrite; rank/device topology lives in unilab.rl.runtime.distributed.context.

Functions

apply_dp_rank_config(cfg, rank)

Apply the per-rank seed and return this rank's visibility-local device.

unilab.training.dp_config.apply_dp_rank_config(cfg, rank)[source]

Apply the per-rank seed and return this rank’s visibility-local device.

Rank 0 keeps the configured seed; rank i>0 trains with seed + i until init broadcast lands in a later stage. The resolved rank-local device is returned instead of being written back into a synthetic training.device key; with rank-local CUDA visibility this is always cuda:0.

Parameters:
Return type:

str | None