UserDefinedRoleMaker¶
- class paddle.distributed.fleet. UserDefinedRoleMaker ( is_collective=False, init_gloo=False, **kwargs ) [source]
-
UserDefinedRoleMaker is an interface for distributed configuration initialization based on obtaining distributed related information from user-defined parameters.
Examples
>>> import paddle.distributed.fleet as fleet >>> from paddle.distributed.fleet.base.role_maker import Role >>> fleet.UserDefinedRoleMaker( ... current_id=0, ... role=Role.SERVER, ... worker_num=2, ... server_endpoints=["127.0.0.1:36011", "127.0.0.1:36012"])