<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/testing/mocking.py#L156-L172) |

Strategy to use with [`tfds.testing.mock_data`](https://www.tensorflow.org/datasets/api_docs/python/tfds/testing/mock_data) to mock the dataset.

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `AUTO` | Try `USE_FILES`, and fallback to `USE_CODE` if the metadata files (`dataset_info.json`,...) are not found. |
| `USE_FILES` | Load dataset from the metadata files (present in the `data_dir` kwarg of [`tfds.testing.mock_data`](https://www.tensorflow.org/datasets/api_docs/python/tfds/testing/mock_data), raise error if data_dir is not reachable. |
| `USE_CODE` | Load the data from the original dataset generation class. Do not use any generated files. More is more convenient but less safe than `USE_FILES`. Not all features might be available (e.g. no split-names). |

<br />

<br />

<br />

<br />

| ## Class Variables ||
|---|---|
| AUTO | `<MockPolicy.AUTO: 1>` |
| USE_CODE | `<MockPolicy.USE_CODE: 2>` |
| USE_FILES | `<MockPolicy.USE_FILES: 3>` |

<br />