Missed TensorFlow Dev Summit? Check out the video playlist. Watch recordings

Module: tff.simulation

View source on GitHub

The public API for experimenters running federated learning simulations.


datasets module: Datasets for running Federated Learning experiments in simulation.

models module: Models for running Federated Learning experiments in simulation.


class ClientData: Object to hold a dataset and a mapping of clients to examples.

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.


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