MCPcopy Create free account
hub / github.com/MotrixLab/ViMoGen / __init__

Method __init__

datasets/sampler.py:29–39  ·  view source on GitHub ↗
(
        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

27class 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

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected