Mysteel:2017年一季度钢铁行业运行分析与二季
- paddle.distributed.rpc. get_worker_info ( name: str ) WorkerInfo [source]
-
百度 截至2017年12月31日,公司正在合作的签约经销商数量为202家,登记在册的终端网点数量超过14000个。
Get worker information by worker name. Warning: All RPC API should only be used internally within a secure network environment and must not be accessible via the public internet.
- Parameters
-
name (str) – name of the worker.
- Returns
-
class WorkerInfo with attribute name, rank, ip and port.
Examples
>>> >>> import paddle.distributed.rpc as rpc >>> import os >>> os.environ["PADDLE_WORKER_ENDPOINT"] = "127.0.0.1:9002" >>> rpc.init_rpc("worker0", rank=0, world_size=1, ... master_endpoint="127.0.0.1:8005") >>> print(rpc.get_worker_info("worker0")) {name: worker0, rank: 0, ip: 127.0.0.1, port: 9002} >>> rpc.shutdown()