<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/write_metadata_utils.py#L107-L195) |

Add metadata required to load with TFDS.

    tfds.folder_dataset.write_metadata(
        *,
        data_dir: https://www.tensorflow.org/datasets/api_docs/python/tfds/typing/PathLike,
        features: features_lib.feature.FeatureConnectorArg,
        split_infos: Union[None, epath.PathLike, Sequence[split_lib.SplitInfo]] = None,
        version: Union[None, str, https://www.tensorflow.org/datasets/api_docs/python/tfds/core/Version] = None,
        filename_template: Union[None, str, https://www.tensorflow.org/datasets/api_docs/python/tfds/core/ShardedFileTemplate] = None,
        check_data: bool = True,
        **ds_info_kwargs
    ) -> None

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

<br />

<br />

<br />

| ## Args ||
|---|---|
| `data_dir` | Dataset path on which to save the metadata |
| `features` | dict of [`tfds.features.FeatureConnector`](https://www.tensorflow.org/datasets/api_docs/python/tfds/features/FeatureConnector) matching the proto specs. |
| `split_infos` | Can be either: \* A path to the pre-computed split info values ( the `out_dir` kwarg of [`tfds.folder_dataset.compute_split_info`](https://www.tensorflow.org/datasets/api_docs/python/tfds/folder_dataset/compute_split_info)) \* A list of [`tfds.core.SplitInfo`](https://www.tensorflow.org/datasets/api_docs/python/tfds/core/SplitInfo) (returned value of [`tfds.folder_dataset.compute_split_info`](https://www.tensorflow.org/datasets/api_docs/python/tfds/folder_dataset/compute_split_info)) \* `None` to auto-compute the split info. |
| `version` | Optional dataset version (auto-infer by default, or fallback to 1.0.0) |
| `filename_template` | the template for the filenames of the data. If None, then the default template `'{DATASET}-{SPLIT}.{FILEFORMAT}-{SHARD_X_OF_Y}'` is used. A string or a ShardedFileTemplate can be given for custom templates. |
| `check_data` | If True, perform additional check to validate the data in data_dir is valid |
| `**ds_info_kwargs` | Additional metadata forwarded to [`tfds.core.DatasetInfo`](https://www.tensorflow.org/datasets/api_docs/python/tfds/core/DatasetInfo) ( description, homepage,...). Will appear in the doc. |

<br />