# tf.contrib.distribute.Monitor

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/distribute/python/monitor.py#L26-L65) |

Executes training steps, recovers and checkpoints.

    tf.contrib.distribute.Monitor(
        step_callable, session=None
    )

Note that this class is particularly preliminary, experimental, and
expected to change.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `step_callable` | a training `Step` that's capable of signaling when done. |
| `session` | a `Session` instance that's needed for graph mode. |

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `ValueError` | if `session` was provided for eager mode or not provided for graph mode. |

<br />

## Methods

### `run_steps`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/distribute/python/monitor.py#L58-L65)

    run_steps(
        num_steps=None
    )