Method
__init__
(
self,
dataset: Dataset,
num_replicas: Optional[int] = None,
rank: Optional[int] = None,
shuffle: bool = True,
seed: int = 0,
drop_last: bool = False,
)
Source from the content-addressed store, hash-verified
| 27 | class StatefulDistributedSampler(DistributedSampler): |
| 28 | |
| 29 | def __init__( |
| 30 | self, |
| 31 | dataset: Dataset, |
| 32 | num_replicas: Optional[int] = None, |
| 33 | rank: Optional[int] = None, |
| 34 | shuffle: bool = True, |
| 35 | seed: int = 0, |
| 36 | drop_last: bool = False, |
| 37 | ) -> None: |
| 38 | super().__init__(dataset, num_replicas, rank, shuffle, seed, drop_last) |
| 39 | self.start_index: int = 0 |
| 40 | |
| 41 | def __iter__(self) -> Iterator: |
| 42 | iterator = super().__iter__() |
Callers
nothing calls this directly
Tested by
no test coverage detected