torchtnt.utils.distributed.get_file_init_method¶
-
torchtnt.utils.distributed.
get_file_init_method
(*, world_size: Optional[int] = None, rank: Optional[int] = None, filename: Optional[str] = None) str ¶ Gets init method for the TCP protocol for the distributed environment. For more information, see here: https://pytorch.org/docs/stable/distributed.html#shared-file-system-initialization
Parameters: - world_size – global number of workers. If
None
, the default is fetched using :function:`get_world_size`. - rank – Global rank of the worker calling the function. If
None
, the default is fetched using :function:`get_global_rank`. - filename – The filename to use for synchronization. If
None
, a new temporary file is used.
- world_size – global number of workers. If