# Module: tff.simulation

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/federated/blob/v0.87.0 Version 2.0, January 2004 Licensed under the Apache License, Version 2.0 (the) |

Libraries for running TensorFlow Federated simulations.

## Modules

[`baselines`](https://www.tensorflow.org/federated/api_docs/python/tff/simulation/baselines) module: Libraries for constructing baseline learning tasks suitable for simulation.

[`datasets`](https://www.tensorflow.org/federated/api_docs/python/tff/simulation/datasets) module: Datasets for running TensorFlow Federated simulations.

[`models`](https://www.tensorflow.org/federated/api_docs/python/tff/simulation/models) module: Models for running TensorFlow Federated simulations.

## Classes

[`class SequenceTypeNotAssignableError`](https://www.tensorflow.org/federated/api_docs/python/tff/simulation/SequenceTypeNotAssignableError): Inappropriate argument type.

[`class SequenceTypeNotFoundError`](https://www.tensorflow.org/federated/api_docs/python/tff/simulation/SequenceTypeNotFoundError): Inappropriate argument type.

## Functions

[`build_uniform_sampling_fn(...)`](https://www.tensorflow.org/federated/api_docs/python/tff/simulation/build_uniform_sampling_fn): Builds the function for sampling from the input iterator at each round.

[`compose_dataset_computation_with_computation(...)`](https://www.tensorflow.org/federated/api_docs/python/tff/simulation/compose_dataset_computation_with_computation): Builds a new [`tff.Computation`](https://www.tensorflow.org/federated/api_docs/python/tff/Computation) which constructs datasets on clients.

[`compose_dataset_computation_with_iterative_process(...)`](https://www.tensorflow.org/federated/api_docs/python/tff/simulation/compose_dataset_computation_with_iterative_process): Builds a new iterative process which constructs datasets on clients.

[`compose_dataset_computation_with_learning_process(...)`](https://www.tensorflow.org/federated/api_docs/python/tff/simulation/compose_dataset_computation_with_learning_process): Builds a new learning process which constructs datasets on clients.

[`run_training_process(...)`](https://www.tensorflow.org/federated/api_docs/python/tff/simulation/run_training_process): Runs a federated `training_process`.

<br />

<br />

<br />

| ## Other Members ||
|---|---|
| EVALUATION_METRICS_PREFIX | `'evaluation/'` |
| EVALUATION_TIME_KEY | `'evaluation_time_in_seconds'` |
| ROUND_NUMBER_KEY | `'round_number'` |
| ROUND_TIME_KEY | `'round_time_in_seconds'` |
| TRAINING_TIME_KEY | `'training_time_in_seconds'` |

<br />