MCPcopy Create free account
hub / github.com/PolymathicAI/AstroCLIP / is_main_process

Function is_main_process

astroclip/astrodino/distributed.py:66–71  ·  view source on GitHub ↗

Returns: True if the current process is the main one.

()

Source from the content-addressed store, hash-verified

64
65
66def is_main_process() -> bool:
67 """
68 Returns:
69 True if the current process is the main one.
70 """
71 return get_global_rank() == 0
72
73
74def _restrict_print_to_main_process() -> None:

Callers 1

printFunction · 0.85

Calls 1

get_global_rankFunction · 0.85

Tested by

no test coverage detected