This commit is contained in:
parent
af095b448a
commit
a273c4e2d3
|
|
@ -308,8 +308,8 @@ def main():
|
|||
)
|
||||
|
||||
# 多机/多卡分片(让每个全局 rank 读不同子流)
|
||||
world_size = int(os.environ.get("WORLD_SIZE", "1"))
|
||||
ds_stream2 = ds_stream2.shard(num_shards=world_size, index=rank, contiguous=True)
|
||||
# world_size = int(os.environ.get("WORLD_SIZE", "1"))
|
||||
# ds_stream2 = ds_stream2.shard(num_shards=world_size, index=rank, contiguous=True)
|
||||
def ex_iter2():
|
||||
for ex in ds_stream2:
|
||||
yield ex
|
||||
|
|
|
|||
Loading…
Reference in New Issue