distributed.pyi 465 Bytes
Newer Older
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
1
2
3
4
5
6
7
8
# 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]=...): ...
9
    def __iter__(self) -> Iterator[T_co]: ...
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
10
11
    def __len__(self) -> int: ...
    def set_epoch(self, epoch: int) -> None: ...