<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/datasets/blob/v4.9.10/tensorflow_datasets/core/folder_dataset/compute_split_utils.py#L124-L170) |

Compute the split info on the given files.

    tfds.folder_dataset.compute_split_info(
        *,
        out_dir: Optional[epath.PathLike] = None,
        filename_template: https://www.tensorflow.org/datasets/api_docs/python/tfds/core/ShardedFileTemplate
    ) -> Sequence[https://www.tensorflow.org/datasets/api_docs/python/tfds/core/SplitInfo]

Compute the split info (num shards, num examples,...) metadata required
by [`tfds.folder_dataset.write_metadata`](https://www.tensorflow.org/datasets/api_docs/python/tfds/folder_dataset/write_metadata).

See documentation for usage:
<https://www.tensorflow.org/datasets/external_tfrecord>

<br />

<br />

<br />

| ## Args ||
|---|---|
| `out_dir` | Output directory where to save the metadata. It should be available from the apache beam workers. If not set, apache beam won't be used (only available with some file formats). |
| `filename_template` | filename template of the splits. The template should have set the data_dir because this is used to compute the split info. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| `split_infos` | The list of [`tfds.core.SplitInfo`](https://www.tensorflow.org/datasets/api_docs/python/tfds/core/SplitInfo). |

<br />