Skip to content

Commit db9e56f

Browse files
Conchylicultorcopybara-github
authored andcommitted
Fix S3 for imagenet_corrupted
PiperOrigin-RevId: 257693279
1 parent 8d6f9a6 commit db9e56f

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

tensorflow_datasets/image/imagenet2012_corrupted.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ def __init__(self, corruption_type=None, severity=1, **kwargs):
8484
experiments={tfds.core.Experiment.S3: False})
8585
_SUPPORTED_VERSIONS = [
8686
# Will be made canonical in near future.
87-
tfds.core.Version(
88-
'3.0.0', experiments={tfds.core.Experiment.S3: False}),
87+
tfds.core.Version('3.0.0'),
8988
]
9089
# Version history:
9190
# 3.0.0: Fix colorization (all RGB) and format (all jpeg); use TAR_STREAM.
@@ -106,14 +105,13 @@ def _make_builder_configs():
106105
for each_corruption in TYPE_LIST:
107106
for each_severity in range(1, 6):
108107
name_str = each_corruption + '_' + str(each_severity)
109-
version_str = '0.0.1'
110108
description_str = 'corruption type = ' + each_corruption + ', severity = '
111109
description_str += str(each_severity)
112110
config_list.append(
113111
Imagenet2012CorruptedConfig(
114112
name=name_str,
115-
version=tfds.core.Version(
116-
version_str, experiments={tfds.core.Experiment.S3: False}),
113+
version=_VERSION,
114+
supported_versions=_SUPPORTED_VERSIONS,
117115
description=description_str,
118116
corruption_type=each_corruption,
119117
severity=each_severity,

0 commit comments

Comments
 (0)