MCPcopy Create free account
hub / github.com/FoundationVision/ByteTrack / get_local_rank

Function get_local_rank

yolox/utils/dist.py:67–77  ·  view source on GitHub ↗

Returns: The rank of the current process within the local (per-machine) process group.

()

Source from the content-addressed store, hash-verified

65
66
67def get_local_rank() -> int:
68 """
69 Returns:
70 The rank of the current process within the local (per-machine) process group.
71 """
72 if not dist.is_available():
73 return 0
74 if not dist.is_initialized():
75 return 0
76 assert _LOCAL_PROCESS_GROUP is not None
77 return dist.get_rank(group=_LOCAL_PROCESS_GROUP)
78
79
80def get_local_size() -> int:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected