|View source on GitHub|
Constructs an executor to execute computations on the local machine.
tff.framework.create_local_executor( num_clients=None, max_fanout=100 )
Used in the tutorials:
- Federated Learning for Image Classification
- Federated Learning for Text Generation
- High-performance simulations with TFF
NOTE: This function is only available in Python 3.
num_clients: The number of clients. If specified, the executor factory function returned by
create_local_executorwill be configured to have exactly
num_clientsclients. If unspecified (
None), then the function returned will attempt to infer cardinalities of all placements for which it is passed values.
max_fanout: The maximum fanout at any point in the aggregation hierarchy. If
num_clients > max_fanout, the constructed executor stack will consist of multiple levels of aggregators. The height of the stack will be on the order of
log(num_clients) / log(max_fanout).
An executor factory function which returns a
tff.framework.Executor upon invocation with a dict mapping placements
to positive integers.
ValueError: If the number of clients is specified and not one or larger.