• Docs >
  • Utils >
  • torchtnt.utils.distributed.get_file_init_method
Shortcuts

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.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources