Save the date! Google I/O returns May 18-20 Register now

tff.framework.sizing_executor_factory

Constructs an executor factory to execute computations locally with sizing.

Used in the notebooks

Used in the tutorials

num_clients The number of clients. If specified, the executor factory function returned by sizing_executor_factory will be configured to have exactly num_clients clients. 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).
clients_per_thread Integer number of clients for each of TFF's threads to run in sequence. Increasing clients_per_thread therefore reduces the concurrency of the TFF runtime, which can be useful if client work is very lightweight or models are very large and multiple copies cannot fit in memory.

An instance of executor_factory.ExecutorFactory encapsulating the executor construction logic specified above.

ValueError If the number of clients is specified and not one or larger.