MCPcopy Create free account
hub / github.com/bbaaii/DreamDiffusion / _do_parallel_data_prefetch

Function _do_parallel_data_prefetch

code/dc_ldm/util.py:95–104  ·  view source on GitHub ↗
(func, Q, data, idx, idx_to_fn=False)

Source from the content-addressed store, hash-verified

93 return getattr(importlib.import_module(module, package=None), cls)
94
95def _do_parallel_data_prefetch(func, Q, data, idx, idx_to_fn=False):
96 # create dummy dataset instance
97
98 # run prefetching
99 if idx_to_fn:
100 res = func(data, worker_id=idx)
101 else:
102 res = func(data)
103 Q.put([idx, res])
104 Q.put("Done")
105
106
107def parallel_data_prefetch(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected