# orbit.utils.make_distributed_dataset

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/models/blob/v2.20.0/orbit/utils/common.py#L47-L90) |

A utility function to help create a [`tf.distribute.DistributedDataset`](https://www.tensorflow.org/api_docs/python/tf/distribute/DistributedDataset).

    orbit.utils.make_distributed_dataset(
        strategy, dataset_or_fn, *args, **kwargs
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `strategy` | An instance of [`tf.distribute.Strategy`](https://www.tensorflow.org/api_docs/python/tf/distribute/Strategy). |
| `dataset_or_fn` | A instance of [`tf.data.Dataset`](https://www.tensorflow.org/api_docs/python/tf/data/Dataset), or a "dataset function" returning a [`tf.data.Dataset`](https://www.tensorflow.org/api_docs/python/tf/data/Dataset). If it is a function, it may optionally have an argument named `input_context` which will be passed a [`tf.distribute.InputContext`](https://www.tensorflow.org/api_docs/python/tf/distribute/InputContext) instance. |
| `*args` | Any positional arguments to pass through to `dataset_or_fn`. |
| `**kwargs` | Any keyword arguments to pass through to `dataset_or_fn`, except that the `input_options` keyword is used to specify a [`tf.distribute.InputOptions`](https://www.tensorflow.org/api_docs/python/tf/distribute/InputOptions) for making the distributed dataset. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A distributed Dataset. ||

<br />