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

Function get_local_size

yolox/utils/dist.py:80–89  ·  view source on GitHub ↗

Returns: The size of the per-machine process group, i.e. the number of processes per machine.

()

Source from the content-addressed store, hash-verified

78
79
80def get_local_size() -> int:
81 """
82 Returns:
83 The size of the per-machine process group, i.e. the number of processes per machine.
84 """
85 if not dist.is_available():
86 return 1
87 if not dist.is_initialized():
88 return 1
89 return dist.get_world_size(group=_LOCAL_PROCESS_GROUP)
90
91
92def is_main_process() -> bool:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected