"official/utils/logs/logger.py" did not exist on "86cb0aa38d49b8b8435515561f3f834f24163841"
__init__.pyi 874 Bytes
Newer Older
Tom Birch's avatar
Tom Birch committed
1
2
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.

3
from typing import Union, Callable, Optional, Any
4
from torch.futures import Future
Tom Birch's avatar
Tom Birch committed
5
6
7
8
9
10
11
12
13


class RRef:
    ...


class WorkerInfo:
    ...

14
15
16
17
18
class BackendType:
    TENSORPIPE: Any
    PROCESS_GROUP: Any

def TensorPipeRpcBackendOptions(init_method: str) -> Any : ...
Tom Birch's avatar
Tom Birch committed
19
20
21
22
23
24
25

def rpc_async(
    to: Union[str, WorkerInfo],
    func: Callable,
    args: Optional[tuple] = None,
    kwargs: Optional[dict] = None,
    timeout=-1.0,
26
) -> Future:
Tom Birch's avatar
Tom Birch committed
27
28
29
30
31
32
33
34
35
36
37
    ...


def rpc_sync(
    to: Union[str, WorkerInfo],
    func: Callable,
    args: Optional[tuple] = None,
    kwargs: Optional[dict] = None,
    timeout=-1.0,
) -> None:
    ...
38
39
40
41
42


def init_rpc(name: str, backend: Optional[Any] = None, rank:int = -1, world_size: Optional[int] = None, rpc_backend_options: Optional[Any] = None) -> None: ...

def shutdown() -> None: ...