distributed.pyi 464 Bytes
Newer Older
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
1
2
3
4
5
6
7
8
9
10
11
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.

from typing import TypeVar, Optional, Iterator
from . import Sampler, Dataset

T_co = TypeVar('T_co', covariant=True)
class DistributedSampler(Sampler[T_co]):
    def __init__(self, dataset: Dataset, num_replicas: Optional[int]=..., rank: Optional[int]=...): ...
    def __iter__(self) -> Iterator[int]: ...
    def __len__(self) -> int: ...
    def set_epoch(self, epoch: int) -> None: ...