MCPcopy Create free account
hub / github.com/allenai/molmo / get_device_batch

Function get_device_batch

tests/data/test_data_iterator.py:97–103  ·  view source on GitHub ↗
(_worker_its)

Source from the content-addressed store, hash-verified

95 global_batch_size=global_batch_size, seed=32, start_index=start)))
96
97 def get_device_batch(_worker_its):
98 while True:
99 for it in _worker_its:
100 batch = []
101 for _ in range(device_batch_size):
102 batch.append(next(it))
103 yield batch
104
105 device_iterators.append(get_device_batch(worker_iterators))
106 torch.utils.data.get_worker_info = bk

Callers 1

test_distributedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected