MCPcopy Index your code
hub / github.com/modelscope/modelscope / is_master

Function is_master

modelscope/utils/torch_utils.py:185–186  ·  view source on GitHub ↗
(group=None)

Source from the content-addressed store, hash-verified

183
184
185def is_master(group=None):
186 return dist.get_rank(group) == 0 if is_dist() else True
187
188
189def master_only(group=None):

Callers 15

log_masterFunction · 0.90
save_pretrainedFunction · 0.90
get_loggerFunction · 0.90
print_cfgMethod · 0.90
print_hook_infoMethod · 0.90
get_metric_valuesFunction · 0.90
collect_results_cpuFunction · 0.90
collect_results_gpuFunction · 0.90
_dump_logMethod · 0.90
stepMethod · 0.90
before_runMethod · 0.90

Calls 1

is_distFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…