MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / __init__

Method __init__

sat/sgm/webds.py:56–74  ·  view source on GitHub ↗
(self, urls, seed, nshards=sys.maxsize, deterministic=True)

Source from the content-addressed store, hash-verified

54
55class ConfiguredResampledShards(ResampledShards):
56 def __init__(self, urls, seed, nshards=sys.maxsize, deterministic=True):
57 from sat.helpers import print_rank0
58
59 try:
60 from megatron.core.parallel_state import get_data_parallel_group
61
62 group = get_data_parallel_group()
63 print_rank0("Using megatron data parallel group.")
64 except:
65 from sat.mpu import get_data_parallel_group
66
67 try:
68 group = get_data_parallel_group()
69 print_rank0("Using sat data parallel group.")
70 except AssertionError:
71 group = None
72 print_rank0("No data parallel group is specified!")
73 worker_seed_sat_this = partial(worker_seed_sat, group=group, seed=seed)
74 super().__init__(urls, nshards, worker_seed_sat_this, deterministic)
75
76
77class SimpleDistributedWebDataset(DataPipeline):

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls 2

get_data_parallel_groupFunction · 0.90
print_rank0Function · 0.90

Tested by

no test coverage detected