(self, *args, **kwargs)
| 25 | return False |
| 26 | class 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 | |
| 38 | def print0(*args, **kwargs): |
| 39 | if rank0(): |