# tf.compat.v1.train.start_queue_runners

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.13.1/tensorflow/python/training/queue_runner_impl.py#L417-L484) |

Starts all queue runners collected in the graph. (deprecated)

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.train.queue_runner.start_queue_runners`](https://www.tensorflow.org/api_docs/python/tf/compat/v1/train/start_queue_runners)

<br />

    tf.compat.v1.train.start_queue_runners(
        sess=None,
        coord=None,
        daemon=True,
        start=True,
        collection=ops.GraphKeys.QUEUE_RUNNERS
    )

<br />

## Migrate to TF2

<br />

> [!CAUTION]
> **Caution:** This API was designed for TensorFlow v1. Continue reading for details on how to migrate from this API to a native TensorFlow v2 equivalent. See the [TensorFlow v1 to TensorFlow v2 migration guide](https://www.tensorflow.org/guide/migrate) for instructions on how to migrate the rest of your code.

QueueRunners are not compatible with eager execution. Instead, please
use [tf.data](https://www.tensorflow.org/guide/data) to get data into your
model.

<br />

<br />

## Description

> [!WARNING]
> **Deprecated:** THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: To construct input pipelines, use the [`tf.data`](https://www.tensorflow.org/versions/r2.13/api_docs/python/tf/data) module.

This is a companion method to `add_queue_runner()`. It just starts
threads for all queue runners collected in the graph. It returns
the list of all threads.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `sess` | `Session` used to run the queue ops. Defaults to the default session. |
| `coord` | Optional `Coordinator` for coordinating the started threads. |
| `daemon` | Whether the threads should be marked as `daemons`, meaning they don't block program exit. |
| `start` | Set to `False` to only create the threads, not start them. |
| `collection` | A `GraphKey` specifying the graph collection to get the queue runners from. Defaults to `GraphKeys.QUEUE_RUNNERS`. |

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `ValueError` | if `sess` is None and there isn't any default session. |
| `TypeError` | if `sess` is not a [`tf.compat.v1.Session`](https://www.tensorflow.org/versions/r2.13/api_docs/python/tf/compat/v1/Session) object. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A list of threads. ||

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `RuntimeError` | If called with eager execution enabled. |
| `ValueError` | If called without a default [`tf.compat.v1.Session`](https://www.tensorflow.org/versions/r2.13/api_docs/python/tf/compat/v1/Session) registered. |

<br />