espnet3.parallel.parallel.DictReturnWorkerPlugin
Less than 1 minute
espnet3.parallel.parallel.DictReturnWorkerPlugin
class espnet3.parallel.parallel.DictReturnWorkerPlugin(setup_fn: Callable[[], dict])
Bases: WorkerPlugin
A plugin worker for easily returning a dictionary from a setup function.
A WorkerPlugin that calls a user-defined setup function once per worker, and stores the returned dictionary in worker.plugins[“env”].
Initialize the DictReturnWorkerPlugin with a setup function.
setup(worker)
Set up the worker by calling the user-defined setup function.
