TFDS now supports the Croissant 🥐 format! Read the documentation to know more.

tfds.testing.MockPolicy

View source on GitHub

Strategy to use with tfds.testing.mock_data to mock the dataset.

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, 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).

Class Variables

AUTO <MockPolicy.AUTO: 1>
USE_CODE <MockPolicy.USE_CODE: 2>
USE_FILES <MockPolicy.USE_FILES: 3>

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024年04月26日 UTC.