# tf.compat.v2.summary.flush

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/ops/summary_ops_v2.py#L907-L932) |

Forces summary writer to send any buffered data to storage.

#### View aliases


**Main aliases**

\`tf.contrib.summary.flush\`

<br />

    tf.compat.v2.summary.flush(
        writer=None, name=None
    )

This operation blocks until that finishes.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `writer` | The [`tf.summary.SummaryWriter`](https://www.tensorflow.org/api_docs/python/tf/summary/SummaryWriter) resource to flush. The thread default will be used if this parameter is None. Otherwise a [`tf.no_op`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/no_op) is returned. |
| `name` | A name for the operation (optional). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| The created [`tf.Operation`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/Operation). ||

<br />