executor
¶
Classes¶
fastvideo.worker.executor.Executor
¶
Executor(fastvideo_args: FastVideoArgs)
Bases: ABC
Source code in fastvideo/worker/executor.py
Functions¶
fastvideo.worker.executor.Executor.collective_rpc
abstractmethod
¶
collective_rpc(method: str | Callable[..., _R], timeout: float | None = None, args: tuple = (), kwargs: dict[str, Any] | None = None) -> list[_R]
Execute an RPC call on all workers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
method
|
str | Callable[..., _R]
|
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
|
required |
timeout
|
float | None
|
Maximum time in seconds to wait for execution. Raises a
:exc: |
None
|
args
|
tuple
|
Positional arguments to pass to the worker method. |
()
|
kwargs
|
dict[str, Any] | None
|
Keyword arguments to pass to the worker method. |
None
|
Returns:
| Type | Description |
|---|---|
list[_R]
|
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.