MCPcopy Create free account
hub / github.com/lingeringlight/START / setup_for_distributed

Function setup_for_distributed

utils.py:172–184  ·  view source on GitHub ↗

This function disables printing when not in master process

(is_master)

Source from the content-addressed store, hash-verified

170
171
172def setup_for_distributed(is_master):
173 """
174 This function disables printing when not in master process
175 """
176 import builtins as __builtin__
177 builtin_print = __builtin__.print
178
179 def print(*args, **kwargs):
180 force = kwargs.pop('force', False)
181 if is_master or force:
182 builtin_print(*args, **kwargs)
183
184 __builtin__.print = print
185
186
187def is_dist_avail_and_initialized():

Callers 1

init_distributed_modeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…