Init dist and returns the dist information. Args: launcher: The launcher info. Returns: _dist: If world_size is greater than 1.
(self, launcher=None)
| 338 | return train_data_collator, eval_data_collator |
| 339 | |
| 340 | def init_dist(self, launcher=None): |
| 341 | """Init dist and returns the dist information. |
| 342 | |
| 343 | Args: |
| 344 | launcher: The launcher info. |
| 345 | |
| 346 | Returns: |
| 347 | _dist: If world_size is greater than 1. |
| 348 | """ |
| 349 | if launcher is not None: |
| 350 | init_dist(launcher) |
| 351 | |
| 352 | _, world_size = get_dist_info() |
| 353 | _dist = world_size > 1 |
| 354 | return _dist |
| 355 | |
| 356 | def get_device(self, device=None): |
| 357 | """Get the device information. |
nothing calls this directly
no test coverage detected