Skip to content

Commit a811cac

Browse files
marcenacpThe TensorFlow Datasets Authors
authored andcommitted
Add an allow-list when checking versions in all datasets and rollback imagenet_v2's version.
PiperOrigin-RevId: 690541469
1 parent 762a908 commit a811cac

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

tensorflow_datasets/datasets/imagenet_v2/imagenet_v2_dataset_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def _create_builder_configs():
6969
class Builder(tfds.core.GeneratorBasedBuilder):
7070
"""An ImageNet test set recollected by following the original protocol."""
7171

72-
VERSION = tfds.core.Version('3.1.0')
72+
VERSION = tfds.core.Version('3.0.0')
7373
SUPPORTED_VERSIONS = [
7474
tfds.core.Version('2.0.0'),
7575
]

tensorflow_datasets/testing/version_test.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
import tensorflow_datasets as tfds
2020

21+
_DO_NOT_CKECK_DATASETS = ['imagenet_v2']
22+
2123

2224
@dataclasses.dataclass(frozen=True, kw_only=True)
2325
class _BuilderWithVersionMismatch:
@@ -33,6 +35,8 @@ def test_internal_datasets_have_versions_on_line_with_the_release_notes():
3335
builders_with_version_mismatch: list[_BuilderWithVersionMismatch] = []
3436
for builder in builders:
3537
builder_cls = tfds.core.registered.imported_builder_cls(builder)
38+
if builder_cls.name in _DO_NOT_CKECK_DATASETS:
39+
continue
3640
if not (
3741
hasattr(builder_cls, 'VERSION')
3842
and hasattr(builder_cls, 'RELEASE_NOTES')

0 commit comments

Comments
 (0)