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