MCPcopy
hub / github.com/hpcaitech/ColossalAI / get_world_size

Function get_world_size

applications/ColossalChat/coati/ray/utils.py:24–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22
23
24def get_world_size() -> int:
25 return dist.get_world_size() if dist.is_initialized() else 1
26
27
28def get_actor_from_args(model: str, pretrained: str = None, config=None, lora_rank=0):

Callers 5

__init__Method · 0.50
__init__Method · 0.50
_compute_grad_normMethod · 0.50
__init__Method · 0.50

Calls 2

get_world_sizeMethod · 0.45
is_initializedMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…