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

Method __init__

datasets/sampler.py:62–89  ·  view source on GitHub ↗
(
        self,
        dataset,
        bucket_config: dict,
        num_replicas: Optional[int] = None,
        rank: Optional[int] = None,
        shuffle: bool = True,
        seed: int = 0,
        drop_last: bool = False,
        verbose: bool = False,
        num_bucket_build_workers: int = 1,
    )

Source from the content-addressed store, hash-verified

60class VariableVideoBatchSampler(DistributedSampler):
61
62 def __init__(
63 self,
64 dataset,
65 bucket_config: dict,
66 num_replicas: Optional[int] = None,
67 rank: Optional[int] = None,
68 shuffle: bool = True,
69 seed: int = 0,
70 drop_last: bool = False,
71 verbose: bool = False,
72 num_bucket_build_workers: int = 1,
73 ) -> None:
74 super().__init__(
75 dataset=dataset,
76 num_replicas=num_replicas,
77 rank=rank,
78 shuffle=shuffle,
79 seed=seed,
80 drop_last=drop_last,
81 )
82 self.dataset = dataset
83 self.bucket = Bucket(bucket_config)
84 self.verbose = verbose
85 self.last_micro_batch_access_index = 0
86 self.approximate_num_batch = None
87
88 self._get_num_batch_cached_bucket_sample_dict = None
89 self.num_bucket_build_workers = num_bucket_build_workers
90
91 def __iter__(self) -> Iterator[List[int]]:
92 if self._get_num_batch_cached_bucket_sample_dict is not None:

Callers

nothing calls this directly

Calls 2

BucketClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected