<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/dataset_info.py#L82-L104) |

Abstract base class for DatasetInfo metadata container.

`builder.info.metadata` allows the dataset to expose additional general
information about the dataset which are not specific to a feature or
individual example.

To implement the interface, overwrite `save_metadata` and
`load_metadata`.

See [`tfds.core.MetadataDict`](https://www.tensorflow.org/datasets/api_docs/python/tfds/core/MetadataDict) for a simple implementation that acts as a
dict that saves data to/from a JSON file.

## Methods

### `load_metadata`

[View source](https://github.com/tensorflow/datasets/blob/v4.9.10/tensorflow_datasets/core/dataset_info.py#L101-L104)

    @abc.abstractmethod
    load_metadata(
        data_dir
    )

Restore the metadata.

### `save_metadata`

[View source](https://github.com/tensorflow/datasets/blob/v4.9.10/tensorflow_datasets/core/dataset_info.py#L96-L99)

    @abc.abstractmethod
    save_metadata(
        data_dir
    )

Save the metadata.