torchtnt.utils.distributed.get_local_rank¶
-
torchtnt.utils.distributed.
get_local_rank
() int ¶ Get rank using the
LOCAL_RANK
environment variable, if populated: https://pytorch.org/docs/stable/elastic/run.html#environment-variables Defaults to 0 ifLOCAL_RANK
is not set.