tff.framework.FederatedResolvingStrategy

A strategy for resolving federated types and intrinsics.

Inherits From: FederatingStrategy

This strategy implements the federating_executor.FederatingStrategy interface and provides logic for resolving federated types and federated intrinsics on an underlying collection of target executor(s) associated with individual placements.

This strategy only supports the placements:

Note that this strategy does not have a built-in concept of intermediate aggregation, partitioning placements, clustering clients, etc.

executor A federating_executor.FederatingExecutor to use to handle unplaced types, computations, and processing.
target_executors A dict mapping placements to a collection of target executors associated with individual placements. The keys in this dictionary are placement literals. The values can be either single executors (if there only is a single participant associated with that placement, e.g. tff.SERVER) or lists of executors.

TypeError If target_executors is not a dict, where each key is a placement_literals.PlacementLiteral and each value is either an executor_base.Executor or a list of executor_base.Executors.
ValueError If target_executors contains a placement_literals.PlacementLiteral key that is not a kind supported by the FederatedResolvingStrategy.

Methods

close

View source

Release resources associated with this strategy, if any.

compute_federated_aggregate

View source

Returns an embedded call for a federated aggregate.

compute_federated_apply

View source

Returns an embedded call for a federated apply.

compute_federated_broadcast

View source

Returns an embedded call for a federated broadcast.

compute_federated_collect

View source

Returns an embedded call for a federated collect.

compute_federated_eval_at_clients

View source

Returns an embedded call for a federated eval at clients.

compute_federated_eval_at_server

View source

Returns an embedded call for a federated eval at server.

compute_federated_intrinsic

View source

Returns an embedded call for a federated intrinsic.

Args
uri The URI of an intrinsic to embed.
arg An optional embedded argument of the call, or None if no argument is supplied.

compute_federated_map

View source

Returns an embedded call for a federated map.

compute_federated_map_all_equal

View source

Returns an embedded call for a federated map all equal.

compute_federated_mean

View source

Returns an embedded call for a federated mean.

compute_federated_reduce

View source

Returns an embedded call for a federated reduce.

compute_federated_secure_sum

View source

Returns an embedded call for a federated secure sum.

compute_federated_sum

View source

Returns an embedded call for a federated sum.

compute_federated_value

View source

Returns an embedded value for a federated type.

Args
value An object to embed in the executor.
type_signature A tff.Type, the type of value.

compute_federated_value_at_clients

View source

Returns an embedded call for a federated value at clients.

compute_federated_value_at_server

View source

Returns an embedded call for a federated value at server.

compute_federated_weighted_mean

View source

Returns an embedded call for a federated weighted mean.

compute_federated_zip_at_clients

View source

Returns an embedded call for a federated zip at clients.

compute_federated_zip_at_server

View source

Returns an embedded call for a federated zip at server.

factory

View source

ingest_value

View source