# tff.program.TensorBoardReleaseManager

<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) |

A [`tff.program.ReleaseManager`](https://www.tensorflow.org/federated/api_docs/python/tff/program/ReleaseManager) that releases values to TensorBoard.

Inherits From: [`ReleaseManager`](https://www.tensorflow.org/federated/api_docs/python/tff/program/ReleaseManager)

    tff.program.TensorBoardReleaseManager(
        summary_dir: Union[str, os.PathLike[str]]
    )

A [`tff.program.TensorBoardReleaseManager`](https://www.tensorflow.org/federated/api_docs/python/tff/program/TensorBoardReleaseManager) is a utility for releasing values
from a federated program to TensorBoard and is used to release values from
platform storage to customer storage in a federated program.

Values are released as summary data using [`tf.summary`](https://www.tensorflow.org/api_docs/python/tf/summary). When the value is
released, if the value is a value reference or a structure containing value
references, each value reference is materialized. The value is then flattened
and released as summary data. The structure of the value is used as the name
of the summary data. Scalar values are released using [`tf.summary.scalar`](https://www.tensorflow.org/api_docs/python/tf/summary/scalar) and
non-scalar values are released using [`tf.summary.histogram`](https://www.tensorflow.org/api_docs/python/tf/summary/histogram).

> [!WARNING]
> **Warning:** The summary data can only contain booleans, integers, unsigned integers, and floats, releasing any other values will be silently ignored.

See <https://www.tensorflow.org/api_docs/python/tf/summary> for more information
about summary data and how to visualize summary data using TensorBoard.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `summary_dir` | A path on the file system to save release values. If this path does not exist it will be created. |

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `ValueError` | If `summary_dir` is an empty string. |

<br />

## Methods

### `release`

[View source](https://github.com/tensorflow/federated/blob/v0.87.0
Version 2.0, January 2004
Licensed under the Apache License, Version 2.0 (the)

    release(
        value: https://www.tensorflow.org/federated/api_docs/python/tff/program#ReleasableStructure,
        key
    ) -> value_reference.MaterializedValue

Releases `value` from a federated program.

<br />

<br />

<br />

| Args ||
|---|---|
| `value` | A [`tff.program.ReleasableStructure`](https://www.tensorflow.org/federated/api_docs/python/tff/program#ReleasableStructure) to release. |
| `key` | A integer used to reference the released `value`; `key` represents a step in a federated program. |

<br />