Aggregation Factory that performs secure summation over metrics.
metric_value_ranges: Optional[UserMetricValueRangeDict] = None
tff.templates.AggregationProcess uses the inner summation
processes created by the
tff.aggregators.SecureSumFactory to sum unfinalized
Internally metrics are grouped by their value range and dtype, and only one
secure aggregation process will be created for each group. This is an
optimization for computation tracing and compiling, which can be slow
when there are a large number of independent aggregations.
initialize function initializes the
state for each inner secure
aggregation progress. The
next function takes the
state and local
unfinalized metrics reported from
tff.CLIENTS, and returns a
tff.templates.MeasuredProcessOutput object with the following properties:
collections.OrderedDict of the
states of the inner secure
collections.OrderedDict of secure summed unfinalized
collections.OrderedDict of the measurements of inner
secure aggregation processes.
collections.OrderedDict that matches
the structure of
local_unfinalized_metrics_type (a value for each
tff.types.TensorType in the type tree). Each leaf in the tree should
have a 2-tuple that defines the range of expected values for that
variable in the metric. If the entire structure is
None, a default
[0.0, 2.0**20 - 1] will be applied to integer variables and
auto-tuned bounds will be applied to float variable. Each leaf may also
None, which will also get the default range according to the
variable value type; allowing partial user sepcialization. At runtime,
values that fall outside the ranges specified at the leaves will be
clipped to within the range.
metric_value_ranges type mismatches.
AggregationProcess for secure summation over metrics.
If any argument type mismatches.