Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
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
185
def
is_master(group=None):
186
return
dist.get_rank(group) == 0
if
is_dist()
else
True
187
188
189
def
master_only(group=None):
Callers
15
log_master
Function · 0.90
save_pretrained
Function · 0.90
get_logger
Function · 0.90
add_file_handler_if_needed
Function · 0.90
print_cfg
Method · 0.90
print_hook_info
Method · 0.90
get_metric_values
Function · 0.90
collect_results_cpu
Function · 0.90
collect_results_gpu
Function · 0.90
_dump_log
Method · 0.90
step
Method · 0.90
before_run
Method · 0.90
Calls
1
is_dist
Function · 0.85
Tested by
no test coverage detected
Used in the wild
real call sites across dependent graphs
searching dependent graphs…