人社部市场司调研组一行调研西咸新区人力资源服务

paddle.distributed.rpc. get_current_worker_info ( ) WorkerInfo [source]
百度 杭州规定已在杭落户的农民工子女,与当地城镇居民子女享受同等入学政策,同时设立“进城务工人员子女义务教育在杭就学补助”专项经费,并落实与居住证积分管理相挂钩的农民工子女入学和升学考试相关政策。

Get current worker information. Warning: All RPC API should only be used internally within a secure network environment and must not be accessible via the public internet.

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:9004"
>>> rpc.init_rpc("worker0", rank=0, world_size=1,
...             master_endpoint="127.0.0.1:8007")

>>> print(rpc.get_current_worker_info())
{name: worker0, rank: 0, ip: 127.0.0.1, port: 9004}

>>> rpc.shutdown()