unilab.base.process_device.resolve_backend_env_device_id

unilab.base.process_device.resolve_backend_env_device_id(backend_type, *, learner_device=None)[source]

Resolve the simulator payload id from the rank-local CUDA namespace.

None means the backend has no payload device field. With CUDA visible, exactly one rank-local entry is required and the payload id is always 0; otherwise the explicit non-Genesis learner device fallback remains valid.

Parameters:
Return type:

int | None