fastvideo.worker.executor#
Module Contents#
Classes#
Data#
API#
- class fastvideo.worker.executor.Executor(fastvideo_args: fastvideo.fastvideo_args.FastVideoArgs)[source]#
Bases:
abc.ABC- abstract collective_rpc(method: str | collections.abc.Callable[..., fastvideo.worker.executor._R], timeout: float | None = None, args: tuple = (), kwargs: dict[str, Any] | None = None) list[fastvideo.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
selfargument, in addition to the arguments passed inargsandkwargs. Theselfargument will be the worker object.timeout β
Maximum time in seconds to wait for execution. Raises a
- exc:
TimeoutErroron timeout.Nonemeans 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.pipelines.ForwardBatch, fastvideo_args: fastvideo.fastvideo_args.FastVideoArgs) fastvideo.pipelines.ForwardBatch[source]#
- classmethod get_class(fastvideo_args: fastvideo.fastvideo_args.FastVideoArgs) type[fastvideo.worker.executor.Executor][source]#