(torch_dist, obj: Any, dst: int = 0)
| 160 | |
| 161 | |
| 162 | def _dist_gather(torch_dist, obj: Any, dst: int = 0): |
| 163 | if not torch_dist.is_initialized(): |
| 164 | return [obj] |
| 165 | if _dist_is_main(): |
| 166 | objs = [None for _ in range(_dist_size())] |
| 167 | torch_dist.gather_object(obj, objs, dst=dst) |
| 168 | return objs |
| 169 | torch_dist.gather_object(obj, dst=dst) |
| 170 | return None |
| 171 | |
| 172 | |
| 173 | _TRANSFORMERS_SUPPORTED_PATTERN = re.compile(r"qwen3(?!\.5)[\w-]*|llama.*3\.1.*8b.*instruct", re.IGNORECASE) |
no test coverage detected