![]() |
Constructs a simplified execution stack to execute local computations.
tff.framework.thread_debugging_executor_factory(
default_num_clients: int = 0,
clients_per_thread=1,
leaf_executor_fn=tff.framework.EagerTFExecutor
) -> tff.framework.ExecutorFactory
The constructed executors support a limited set of TFF's computations. In particular, the debug executor can only resolve references at the top level of the stack, and therefore assumes that all local computation is expressed in pure TensorFlow.
The debug executor makes particular guarantees about the structure of the stacks it constructs which are intended to make them maximally easy to reason about. That is, the debug executor will essentially execute exactly the computation it is passed (in particular, this implies that there are no caching layers), and uses its declared inability to execute arbitrary TFF lambdas to reduce the complexity of the constructed stack. Every debugging executor will have a similar structure, the simplest structure that can execute the full expressivity of TFF while running each client in a dedicated thread:
ReferenceResolvingExecutor
|
FederatingExecutor
/ ... \
ThreadDelegatingExecutor ThreadDelegatingExecutor | | EagerTFExecutor EagerTFExecutor
This structure can be useful in understanding the concurrency pattern of TFF execution, and where the TFF runtime infers data dependencies.
Returns | |
---|---|
An instance of executor_factory.ExecutorFactory encapsulating the
executor construction logic specified above.
|
Raises | |
---|---|
ValueError
|
If the number of clients is specified and not one or larger. |