MCPcopy Create free account
hub / github.com/FreedomIntelligence/CMB / is_main_process

Method is_main_process

workers/base.py:160–161  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

158 if self.is_main_process:
159 self.writer = open(output_pth, "w", encoding='utf-8')
160 def is_main_process(self):
161 return self.accelerator.is_main_process
162 def print_in_main(self, *args, **kwargs):
163 if self.is_main_process:
164 print(*args, **kwargs)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected