mpi_rank¶
kedro_azureml_pipeline.distributed.mpi_rank()
¶
Return the 0-based rank of this process in an MPI or PyTorch step, else 0.
Reads the variables in :data:RANK_VARS order. A variable that is set but
does not hold an integer is skipped in favour of the next one, and 0 is
returned when none parses, so a single-instance run and a malformed
launcher variable both read as rank 0 instead of failing the step. Use it
for anything that varies per rank, such as a seed offset or a log marker.
Returns ¶
| Type | Description |
|---|---|
int
|
The rank parsed from the first of :data: |
See Also ¶
- is_distributed_master_node : Checks master rank, including the TensorFlow case.
- is_distributed_environment : Detects distributed context.