View source on GitHub

The federated executor orchestrates federated computations.

Inherits From: Executor

The intrinsics currently implemented include:

  • federated_aggregate
  • federated_apply
  • federated_broadcast
  • federated_collect
  • federated_eval
  • federated_map
  • federated_mean
  • federated_reduce
  • federated_sum
  • federated_value
  • federated_weighted_mean
  • federated_zip

This executor is only responsible for handling federated types and federated operators, and a delegation of work to an underlying collection of target executors associated with individual system participants. This executor does not interpret lambda calculus and compositional constructs (blocks, etc.). It understands placements, selected intrinsics (federated operators), it can handle tuples, selections, and calls in a limited way (to the extent that it deals with intrinsics or lambda expressions it can delegate).

The initial implementation of the executor only supports the two basic types of placements (SERVER and CLIENTS), and does not have a built-in concept of intermediate aggregation, partitioning placements, clustering clients, etc.

The initial implementation also does not attempt at performing optimizations in case when the constituents of this executor are either located on the same machine (where marshaling/unmarshaling could be avoided), or when they have the all_equal property (and a single value could be shared by them all).

target_executors A dictionary mapping placements to executors or lists of executors associated with these placements. The keys in this dictionary can be either placement literals, or None to specify the executor for unplaced computations. The values can be either single executors (if there only is a single participant associated with that placement, as would typically be the case with tff.SERVER) or lists of target executors.

ValueError If the value is unrecognized (e.g., a nonexistent intrinsic).



View source

Release resources associated with this Executor, if any.

If the executor has one or more target Executors, implementation of this method must close them.


View source


View source


View source


View source