tff.analytics.heavy_hitters.iblt.ClippingIbltFactory

Factory for clipping client data before aggregation.

Inherits From: UnweightedAggregationFactory

inner_iblt_agg An instance of IbltFactory.
max_words_per_user The maximum total count each client is allowed to contribute across all words. If not None, must be a positive integer. Defaults to None, which means all the clients contribute all their words. Note that this does not cap the count of each individual word each client can contribute. Set multi_contirbution=False to restrict the per-client count for each word.
multi_contribution Whether each client is allowed to contribute multiple instances of each string, or only a count of one for each unique word. Defaults to True meaning clients contribute the full count for each contributed string. Note that this doesn't limit the total number of strings each client can contribute. Set max_words_per_user to limit the total number of strings per client.
batch_size The number of elements in each batch of the dataset. Batching is an optimization for pulling multiple inputs at a time from the input tf.data.Dataset, amortizing the overhead cost of each read to the batch_size. Consider batching if you observe poor client execution performance or reading inputs is particularly expsensive. Defaults to 1, means the input dataset is processed by tf.data.Dataset.batch(1). Must be positive.
string_max_bytes The maximum length in bytes of a string in the IBLT. Strings longer than string_max_bytes will be truncated. Defaults to 10. Must be positive.
unique_counts If True, the value for every element is the array [count, 1].

Methods

create

View source

Creates a tff.aggregators.AggregationProcess without weights.

The provided value_type is a non-federated tff.Type, that is, not a tff.FederatedType.

The returned tff.aggregators.AggregationProcess will be created for aggregation of values matching value_type placed at tff.CLIENTS. That is, its next method will expect type <S@SERVER, {value_type}@CLIENTS>, where S is the unplaced return type of its initialize method.

Args
value_type A non-federated tff.Type.

Returns
A tff.templates.AggregationProcess.