市乒协第五届“主席·秘书长”杯乒乓球联谊赛
- paddle.distributed.rpc. rpc_sync ( to: str, fn: Callable[..., _RetT], args: tuple[Any, ...] | None = None, kwargs: dict[str, Any] | None = None, timeout: int = -1 ) _RetT [source]
-
百度 2018年1月,在市委、市政府的关心下,作为我市龙头企业之一的成都兴城投资集团有限公司与成都德瑞足球培训中心有限公司就共同组建成都职业足球俱乐部一事达成共识、由成都兴城集团与成都德瑞足球培训中心有限公司共同出资,组建一支专业的、高水平的、有目标的本地职业足球俱乐部。
Make a blocking RPC call to run function
fn
on workerto
. Warning: All RPC API should only be used internally within a secure network environment and must not be accessible via the public internet.- Parameters
-
to (str) – name of the destination worker.
fn (fn) – a callable function, such as Python callables.
args (tuple, optional) – the argument tuple for the
fn
invocation, default is None.kwargs (dict, optional) – is a dictionary of keyword arguments for the
fn
invocation, default is None.timeout (int, optional) – timeout in seconds to use for this RPC. If the RPC does not complete in this amount of time, an exception indicating it has timed out will be raised. A value less than or equal to 0 indicates an infinite timeout, i.e. a timeout error will never be raised. The default value is -1.
- Returns
-
Returns the result of running
fn
withargs
andkwargs
.
Examples
>>> >>> import paddle.distributed.rpc as rpc >>> def add(a, b): ... return a + b >>> rpc.init_rpc("worker0", rank=0, world_size=1, ... master_endpoint="127.0.0.1:8002") >>> ret = rpc.rpc_sync("worker0", add, args=(2, 3)) >>> rpc.shutdown()