• Docs >
  • Utils >
  • torchtnt.utils.prepare_module.convert_str_to_strategy
Shortcuts

torchtnt.utils.prepare_module.convert_str_to_strategy

torchtnt.utils.prepare_module.convert_str_to_strategy(strategy: str) Union[DDPStrategy, FSDPStrategy]

Converts strategy as a string to a default instance of the Strategy dataclass.

Parameters:strategy – string specifying the distributed strategy to use
Raises:ValueError if an invalid strategy string is passed.

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