pytorch
fea963d3 - Fix BackendType repr in doc (#30243)

Commit
5 years ago
Fix BackendType repr in doc (#30243) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/30243 Before this commit, rpc docs shows init_rpc as the following: ``` torch.distributed.rpc.init_rpc( name, backend=<BackendType.PROCESS_GROUP: BackendValue( construct_rpc_agent_options_handler=<function _process_group_construct_rpc_agent_options_handler>, init_backend_handler=<function _process_group_init_backend_handler>)>, init_method=None, rank=-1, world_size=None, rpc_agent_options=None ) ``` It unnecessarily leaks implementation details. This commit adds a __repr__ function to BackendType Enum class to address this problem. closes #29905 Test Plan: Imported from OSS Differential Revision: D18641559 Pulled By: mrshenli fbshipit-source-id: 19bf8a2d21c8207f026d097d8e3f077578d53106
Author
Parents
Loading