File size: 321 Bytes
e11e4fe
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from typing import Optional

_rank: Optional[int] = None


def get_rank() -> Optional[int]:
    """
    Returns the rank (in the MPI sense) of the current node.
    For local training, this will always be None.
    If this needs to be used, it should be done from outside ml-agents.
    :return:
    """
    return _rank