fastvideo.v1.worker.executor
#
Module Contents#
Classes#
Data#
API#
- class fastvideo.v1.worker.executor.Executor(fastvideo_args: fastvideo.v1.fastvideo_args.FastVideoArgs)[source]#
Bases:
abc.ABC
- abstract collective_rpc(method: str | collections.abc.Callable[..., fastvideo.v1.worker.executor._R], timeout: float | None = None, args: tuple = (), kwargs: dict[str, Any] | None = None) list[fastvideo.v1.worker.executor._R] [source]#
Execute an RPC call on all workers.
- Parameters:
method β
Name of the worker method to execute, or a callable that is serialized and sent to all workers to execute.
If the method is a callable, it should accept an additional
self
argument, in addition to the arguments passed inargs
andkwargs
. Theself
argument will be the worker object.timeout β
Maximum time in seconds to wait for execution. Raises a
- exc:
TimeoutError
on timeout.None
means wait indefinitely.
args β Positional arguments to pass to the worker method.
kwargs β Keyword arguments to pass to the worker method.
- Returns:
A list containing the results from each worker.
.. note::
It is recommended to use this API to only pass control messages, and set up data-plane communication to pass data.
- execute_forward(forward_batch: fastvideo.v1.pipelines.ForwardBatch, fastvideo_args: fastvideo.v1.fastvideo_args.FastVideoArgs) fastvideo.v1.pipelines.ForwardBatch [source]#
- classmethod get_class(fastvideo_args: fastvideo.v1.fastvideo_args.FastVideoArgs) type[fastvideo.v1.worker.executor.Executor] [source]#