MCPcopy Create free account
hub / github.com/Standard-Intelligence/hertz-dev / __init__

Method __init__

utils/dist.py:27–36  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

25 return False
26class tqdm0(tqdm):
27 def __init__(self, *args, **kwargs):
28 total = kwargs.get('total', None)
29 if total is None and len(args) > 0:
30 try:
31 total = len(args[0])
32 except TypeError:
33 pass
34 if total is not None:
35 kwargs['miniters'] = max(1, total // 20)
36 super().__init__(*args, **kwargs, disable=not rank0(), bar_format='{bar}| {n_fmt}/{total_fmt} [{rate_fmt}{postfix}]')
37
38def print0(*args, **kwargs):
39 if rank0():

Callers

nothing calls this directly

Calls 1

rank0Function · 0.70

Tested by

no test coverage detected