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 in args and kwargs. The self 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]#
abstract set_lora_adapter(lora_nickname: str, lora_path: str | None = None) None[source]#

Set the LoRA adapter for the workers.

abstract shutdown() None[source]#

Shutdown the executor.

fastvideo.v1.worker.executor.logger[source]#

β€˜init_logger(…)’