Module: tff.simulation

Libraries for running Federated Learning simulations.

Modules

datasets module: Datasets for running Federated Learning simulations.

models module: Models for running Federated Learning simulations.

Classes

class ClientData: Object to hold a federated dataset.

class FilePerUserClientData: A tf.simulation.ClientData that maps a set of files to a dataset.

class FromTensorSlicesClientData: ClientData based on tf.data.Dataset.from_tensor_slices.

class HDF5ClientData: A tff.simulation.ClientData backed by an HDF5 file.

class TransformingClientData: Transforms client data, potentially expanding by adding pseudo-clients.

Functions

compose_dataset_computation_with_computation(...): Builds a new tff.Computation which constructs datasets on clients.

compose_dataset_computation_with_iterative_process(...): Builds a new iterative process which constructs datasets on clients.

run_server(...): Runs a gRPC server hosting a simulation component in this process.

server_context(...): Context manager yielding gRPC server hosting simulation component.