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. –